You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Magnus Gether Sørensen edited this page Nov 24, 2017
·
1 revision
Typescript 2.4 added checks for weak types. This meant they changed the interface "Account" located in their standard library, such that it required displayname and id. Therefore it was no longer possible to use the type Account in XDT, without specifying a displayname and id.
Our proposed fix is to use the namespace functionality of XDT. When generating entities for either the Web or REST API, you can specify a string parameter along with it. All the generated types will be wrapped by a namespace with the specified name.
This means if you specify the namespace as "XDT" and you previously wrote
constentity: Account={
...
};
You now write
constentity: XDT.Account={
...
};
This fixes the issue introduced in 2.4 related to the modified interface in the standard library.