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

23 lines (22 loc) 1.59 kB
import * as ts from "ts-morph"; import { CompilerState } from "../CompilerState"; export declare function isIdentifierDefinedInConst(exp: ts.Identifier): boolean; export declare function isIdentifierDefinedInExportLet(exp: ts.Identifier): boolean; /** * Gets the writable operand name, meaning the code should be able to do `returnValue = x;` * The rule in this case is that if there is a depth of 3 or more, e.g. `Foo.Bar.i`, we push `Foo.Bar` */ export declare function getWritableOperandName(state: CompilerState, operand: ts.Expression, doNotCompileAccess?: boolean): { expStr: string; isIdentifier: boolean; }; /** * Similar to getWritableOperandName, but should push anything with any depth. This includes export let vars. */ export declare function getReadableExpressionName(state: CompilerState, exp: ts.Expression, expStr?: string): string; export declare function compilePropertyAccessExpression(state: CompilerState, node: ts.PropertyAccessExpression): string; export declare function addOneToArrayIndex(valueStr: string): string; export declare function getComputedPropertyAccess(state: CompilerState, exp: ts.Expression, fromNode: ts.Node): string; export declare function compileElementAccessBracketExpression(state: CompilerState, node: ts.ElementAccessExpression): string; export declare function compileElementAccessDataTypeExpression(state: CompilerState, node: ts.ElementAccessExpression, expStr?: string): (argExpStr: string) => string; export declare function compileElementAccessExpression(state: CompilerState, node: ts.ElementAccessExpression): string;