SAP / ui5-typescript

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

How to import fiori elements extensionAPI #331

Closed heimwege closed 2 years ago

heimwege commented 2 years ago

Hi colleagues,

I'm trying to migrate one of our apps to TS and am facing issues when trying to import the fiori elements extension api.

import ExtensionAPI from "sap/fe/core/ExtensionAPI";

results in the error

TS2792: Cannot find module 'sap/fe/core/ExtensionAPI'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

This holds true for sap/fe/*

I added sap.fe.core to the ui5.yaml/ui5-dist.yaml without any effect. What am I missing here?

Thanks

heimwege commented 2 years ago

nevermind. I figured out that I used openui5 as base for the generation. After switching so sapui5 ist works 🤦