UNPKG

roblox-ts

Version:

<div align="center"><img width=25% src="https://i.imgur.com/yCjHmng.png"></div> <h1 align="center"><a href="https://roblox-ts.github.io/">roblox-ts</a></h1> <div align="center">A TypeScript-to-Lua Compiler for Roblox</div> <br> <div align="center"> <a hr

27 lines (26 loc) 1.63 kB
import * as ts from "ts-morph"; import { CompilerState } from "../CompilerState"; export declare function shouldWrapExpression(subExp: ts.Node, strict: boolean): boolean; export declare function addOneToStringIndex(valueStr: string): string; export declare function compileList(state: CompilerState, args: Array<ts.Expression>, compile?: (state: CompilerState, expression: ts.Expression) => string): string[]; export declare function compileCallArguments(state: CompilerState, args: Array<ts.Expression>, extraParameter?: string, compile?: (state: CompilerState, expression: ts.Expression) => string): string[]; export declare function compileCallArgumentsAndJoin(state: CompilerState, args: Array<ts.Expression>, extraParameter?: string): string; export declare function compileCallExpression(state: CompilerState, node: ts.CallExpression, doNotWrapTupleReturn?: boolean): string; export declare const enum PropertyCallExpType { None = -1, Array = 0, BuiltInStringMethod = 1, String = 2, PromiseThen = 3, SymbolFor = 4, Map = 5, Set = 6, ObjectConstructor = 7, RbxMathAdd = 8, RbxMathSub = 9, RbxMathMul = 10, RbxMathDiv = 11 } export declare function getPropertyAccessExpressionType(state: CompilerState, expression: ts.PropertyAccessExpression): PropertyCallExpType; export declare function compileElementAccessCallExpression(state: CompilerState, node: ts.CallExpression, expression: ts.ElementAccessExpression): string; export declare function compilePropertyCallExpression(state: CompilerState, node: ts.CallExpression, expression: ts.PropertyAccessExpression): string;