SAP / ui5-typescript

Tooling to enable TypeScript support in SAPUI5/OpenUI5 projects
https://sap.github.io/ui5-typescript
Apache License 2.0
200 stars 28 forks source link

ts-interface-generator does not recognize type `function` #371

Closed HappyHepo closed 2 years ago

HappyHepo commented 2 years ago

Describe the bug ts-interface-generator does not recognize the type function as special and subsequently adds a default import in the generated interface definition. On the Console, a warning is printed: For the type 'function' an import is created with module name 'function', using its default export. Is this correct? In the generated interface definition, the following import is added: import function from "function";

This breaks typescript compilation of the file.

Expected behavior Recognize function as special type that does not need importing in the interface definition.

akudev commented 2 years ago

@HappyHepo thanks for reporting! I've just fixed it, so it will be in the next release of the tool (some time after UI5con).