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
useDefineForClassFields changes behavior of how class properties are initialized (TypeScript documentation). TypeScript recommends enabling it as it makes TypeScript code closer to ECMA runtime behavior
This breaks following:
All classes derived from Entity:
Because of how properties are initialized in Entity class, all classes which extend Entity and initialize it's properties via Entity constructor (super(props, iModel)) will not have those properties initialized (they will be set to undefined). TS playground of suggested fix
A few tests in @itwin/core-bentley:
With useDefineForClassFields enabled properties not initialized during class construction are created and set to undefined while currently those properties are absent. This breaks some of the deepEqual asserts.
RPC interface / implementation registration.
The text was updated successfully, but these errors were encountered:
useDefineForClassFields
changes behavior of how class properties are initialized (TypeScript documentation). TypeScript recommends enabling it as it makes TypeScript code closer to ECMA runtime behaviorThis breaks following:
Entity
:Because of how properties are initialized in
Entity
class, all classes which extendEntity
and initialize it's properties viaEntity
constructor (super(props, iModel)
) will not have those properties initialized (they will be set toundefined
). TS playground of suggested fixWith
useDefineForClassFields
enabled properties not initialized during class construction are created and set toundefined
while currently those properties are absent. This breaks some of thedeepEqual
asserts.The text was updated successfully, but these errors were encountered: