-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
🐛 Bug: .value
does not exist in BooleanLiteralType
#528
Comments
Spooky. Maybe it used to exist, but no longer does? |
@all-contributors please add @kirkwaiblinger for bug.
|
I've put up a pull request to add @kirkwaiblinger! 🎉 |
Yeah, I was wondering that, too - didn't see it on any of the TS versions available on the playground, so, if so, maybe it hasn't been that way for a while? 🤷♂️ |
Adds @kirkwaiblinger as a contributor for bug. This was requested by JoshuaKGoldberg [in this comment](#528 (comment)) --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Bug Report Checklist
main
branch of the repository.Expected
In this snippet
I expect the assertion to pass.
Actual
It fails; there is no
.value
field in the TS type, so the type isundefined
.Additional Info
The type is defined like so:
ts-api-utils/src/types/typeGuards/literal.ts
Lines 6 to 14 in 8c74729
typescript-eslint playground link where you can see
.value
isn't there.Workaround in use case in typescript-eslint:
https://github.com/typescript-eslint/typescript-eslint/blob/07a6e23f489be8908ff690885343378398012130/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts#L66-L88
The text was updated successfully, but these errors were encountered: