Skip to content

Export declaration unsupported #352

@thatcosmonaut

Description

@thatcosmonaut

Re-exporting a module throws a parse error. This pattern is useful for libraries where you define a bunch of classes that you want to export from a top level entry file.

export { MyClass } from "./classes/my_class.ts"

fails with the following error:

Encountered error parsing file: Unsupported expression kind: ExportDeclaration
/example/top_level.ts line: 20 column: 42
Error: Unsupported expression kind: ExportDeclaration
    at Function.TSTLErrors.UnsupportedKind (/home/cosmonaut/programming/encompass-ts/node_modules/typescript-to-lua/dist/Errors.js:32:12)
    at LuaTranspilerJIT.transpileExpression (/home/cosmonaut/programming/encompass-ts/node_modules/typescript-to-lua/dist/Transpiler.js:711:43)
    at LuaTranspilerJIT.transpileNode (/home/cosmonaut/programming/encompass-ts/node_modules/typescript-to-lua/dist/Transpiler.js:300:43)
    at sourceFile.statements.forEach.s (/home/cosmonaut/programming/encompass-ts/node_modules/typescript-to-lua/dist/Transpiler.js:206:72)
    at Array.forEach (<anonymous>)
    at LuaTranspilerJIT.transpileSourceFile (/home/cosmonaut/programming/encompass-ts/node_modules/typescript-to-lua/dist/Transpiler.js:206:36)
    at program.getSourceFiles.forEach.sourceFile (/home/cosmonaut/programming/encompass-ts/node_modules/typescript-to-lua/dist/Compiler.js:80:96)
    at Array.forEach (<anonymous>)
    at emitFilesAndReportErrors (/home/cosmonaut/programming/encompass-ts/node_modules/typescript-to-lua/dist/Compiler.js:75:30)
    at compileFilesWithOptions (/home/cosmonaut/programming/encompass-ts/node_modules/typescript-to-lua/dist/Compiler.js:57:5)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions