-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
refactor(): Rewrite how typeAssertion works to avoid isType and add tests for subclasses #9570
Conversation
Build Stats
|
src/util/typeAssertions.spec.ts
Outdated
class NewText extends Textbox { | ||
status = 'new'; | ||
} |
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.
to make it more complete you should add a
static type = 'NextText'
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.
oh rigth
src/util/typeAssertions.spec.ts
Outdated
class NewPath extends Path { | ||
status = 'new'; | ||
} |
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.
same
Description
Rewrite typeAssertions so they do not need to use isType.
The reason for this was the discussion about isType not being safe in the case of subclasses and also the general will of moving away from isType.
IsType hasn't been removed yet
replace #8952
In Action