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
@vpanichkin I belive it is done intentionally, because this field is stored and taken from the database.
Integers reduce database space and improves performance.
@vpanichkin I belive it is done intentionally, because this field is stored and taken from the database. Integers reduce database space and improves performance.
The issue doesn't lie with numbers, root of all is in enum type because it has unpredictable behavior as @vpanichkin described quite well. If numerical values are necessary they can write code like this below:
Hey,
first of all, thanks for publishing diia to the Open Source.
While reviewing the code, I saw multiple usages of the numeric enums. In fact, that's quite tricky in typescript.
be-types/src/documents/eResident.ts
Lines 5 to 9 in 174697d
The code snippet in the runtime will be compiled to the
namely, you will get an object in the runtime with the following structure. I am sure, you didn't want to have "0","1","2" as a possible keys here.
Solution:
will be converted in the runtime to
as const
modifierIn the Javascript runtime, the object will be
while the type will stay in the Typescript
More details about this topic can be found using the following links:
The text was updated successfully, but these errors were encountered: