Skip to content

@ui5/ts-interface-generator: fails with older TS versions < 4.8 #396

@akudev

Description

@akudev

When TypeScript version 4.7 or below is used, generation fails with one of the following errors:

TypeError: Cannot create property 'pos' on string '$ExampleSettings'
    at setTextRangePos ...
Error: Debug Failure. Unhandled SyntaxKind: Unknown.
    at pipelineEmitWithHintWorker ...

The reason is an incompatible change of the TypeScript compiler API in factory.createInterfaceDeclaration(...) and factory.createParameterDeclaration(...) (first parameter was removed).

Solution: use TypeScript 4.8 or higher.

I don't think the issue is worth working around anymore, although a version check and adding a parameter would theoretically be possible.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestts-interface-generatorRelated to the ts-interface-generator sub-package

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions