-
Notifications
You must be signed in to change notification settings - Fork 0
SOF-7096: TS for math module #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/entity/in_memory.ts
Outdated
| const Entity = this.constructor as typeof InMemoryEntity; | ||
| clone<T extends InMemoryEntity>(extraContext?: object): T { | ||
| // @ts-ignore | ||
| const object: T = new this.constructor({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to use TS ignore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, typescript defines this.constructor as an ordinary function, not a constructor of some particular type. Everytime I try to access some properties or build a new object via new this.constructor it throws an error.
Changed this with typecasting typeof this as suggested here
https://stackoverflow.com/questions/33387318/access-to-static-properties-via-this-constructor-in-typescript
package.json
Outdated
| "@babel/register": "^7.16.0", | ||
| "@babel/runtime-corejs3": "7.16.8", | ||
| "@exabyte-io/esse.js": "2023.11.1-0", | ||
| "@exabyte-io/esse.js": "git+https://github.com/Exabyte-io/esse.git#update/SOF-7096", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be published version
No description provided.