typescript-to-lua
Version:
A generic TypeScript to Lua transpiler. Write your code in TypeScript and publish Lua!
19 lines (18 loc) • 1.94 kB
TypeScript
import * as ts from "typescript";
import * as lua from "../../LuaAST";
import { TransformationContext } from "../context";
export declare function hasDefaultExportModifier(node: ts.Node): boolean;
export declare function hasExportModifier(node: ts.Node): boolean;
export declare function shouldBeExported(node: ts.Node): boolean;
export declare const createDefaultExportStringLiteral: (original?: ts.Node) => lua.StringLiteral;
export declare function getExportedSymbolDeclaration(symbol: ts.Symbol): ts.Declaration | undefined;
export declare function getSymbolFromIdentifier(context: TransformationContext, identifier: lua.Identifier): ts.Symbol | undefined;
export declare function getIdentifierExportScope(context: TransformationContext, identifier: lua.Identifier): ts.SourceFile | ts.ModuleDeclaration | undefined;
export declare function getSymbolExportScope(context: TransformationContext, symbol: ts.Symbol): ts.SourceFile | ts.ModuleDeclaration | undefined;
export declare function getExportedSymbolsFromScope(context: TransformationContext, scope: ts.SourceFile | ts.ModuleDeclaration): ts.Symbol[];
export declare function getDependenciesOfSymbol(context: TransformationContext, originalSymbol: ts.Symbol): ts.Symbol[];
export declare function isSymbolExported(context: TransformationContext, symbol: ts.Symbol): boolean;
export declare function isSymbolExportedFromScope(context: TransformationContext, symbol: ts.Symbol, scope: ts.SourceFile | ts.ModuleDeclaration): boolean;
export declare function addExportToIdentifier(context: TransformationContext, identifier: lua.Identifier): lua.AssignmentLeftHandSideExpression;
export declare function createExportedIdentifier(context: TransformationContext, identifier: lua.Identifier, exportScope?: ts.SourceFile | ts.ModuleDeclaration): lua.AssignmentLeftHandSideExpression;
export declare function createDefaultExportExpression(node: ts.Node): lua.AssignmentLeftHandSideExpression;