Skip to content

Using Typescript 4.3 throws unhandled exception #1025

@lolleko

Description

@lolleko

Repro: https://github.com/Zamiell/tstl-bug/blob/main/README.md courtesy of @Zamiell

/Users/lmbp/Desktop/tstl-bug/node_modules/typescript/lib/typescript.js:110412
                throw e;
                ^

TypeError: tag.text.split is not a function
    at collectAnnotations (/Users/lmbp/Desktop/tstl-bug/node_modules/typescript-to-lua/dist/transformation/utils/annotations.js:31:75)
    at getSignatureAnnotations (/Users/lmbp/Desktop/tstl-bug/node_modules/typescript-to-lua/dist/transformation/utils/annotations.js:84:5)
    at Object.isTupleReturnCall (/Users/lmbp/Desktop/tstl-bug/node_modules/typescript-to-lua/dist/transformation/utils/annotations.js:102:13)
    at Object.exports.transformCallExpression [as transform] (/Users/lmbp/Desktop/tstl-bug/node_modules/typescript-to-lua/dist/transformation/visitors/call.js:169:41)
    at TransformationContext.transformNode (/Users/lmbp/Desktop/tstl-bug/node_modules/typescript-to-lua/dist/transformation/context/context.js:45:62)
    at TransformationContext.transformExpression (/Users/lmbp/Desktop/tstl-bug/node_modules/typescript-to-lua/dist/transformation/context/context.js:57:31)
    at Object.exports.transformExpressionStatement [as transform] (/Users/lmbp/Desktop/tstl-bug/node_modules/typescript-to-lua/dist/transformation/visitors/expression-statement.js:27:28)
    at TransformationContext.transformNode (/Users/lmbp/Desktop/tstl-bug/node_modules/typescript-to-lua/dist/transformation/context/context.js:45:62)
    at /Users/lmbp/Desktop/tstl-bug/node_modules/typescript-to-lua/dist/transformation/context/context.js:71:58
    at Array.flatMap (<anonymous>)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions