Skip to content

Interfaces without need for export/import

Compare
Choose a tag to compare
@nsteenbeek nsteenbeek released this 06 Nov 10:20
· 605 commits to master since this release

Typescript and interfaces

In Typescript, definition files define classes, interfaces, etc and are global available. Luckily this is also the case when having interfaces and types in a Typescript file without export statements. Not exporting and importing interfaces/types is the topic of version 2.0.0.

Entity.model.ts

The x.model.ts files contained exported interfaces and types, but also enums. Enums are not typings, so they still need to be exported and imported and thus they had to be extracted to another file: x.enum.ts.

Update your project

The update command will do the project update for you. Only updating enums was too hard. That's why this is the first major release.

Major release

As mentioned above updating enums usage was too hard. That's why this is the first major release. After update the enums will miss imports. Fixing them is easy.
We recommend following steps for upgrading to 2.0.0:

npm install -g @hso/d365-cli@1.8.3
hso-d365 update
npm install -g @hso/d365-cli@latest
hso-d365 update

Then add the missing enum imports.