We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can continue the conversation there. Go to discussion →
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Narrow doesn't work on class properties
Narrow
interface Foo { bar: Narrow<{hi: 'there'}> } class Bar implements Foo { bar = {hi: 'there'} //error: Type 'string' is not assignable to type 'NarrowRaw<"there">'. }
the value of bar is narrowed to type {hi: 'there'}
bar
{hi: 'there'}
ts-toolbelt 9.5.3 typescript 4.2.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
馃悶 Bug Report
Describe the bug
Narrow
doesn't work on class propertiesReproduce the bug
Expected behavior
the value of
bar
is narrowed to type{hi: 'there'}
Screenshots
Additional context
ts-toolbelt 9.5.3
typescript 4.2.0
The text was updated successfully, but these errors were encountered: