Skip to content
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

fix(eslint-plugin): no-type-alias: fix typeof alias erroring #380

Merged
merged 2 commits into from Mar 27, 2019
Merged

Conversation

skeate
Copy link
Contributor

@skeate skeate commented Mar 27, 2019

I was running into an issue with the rule crashing on code like

type Foo =
  | typeof Bar
  | typeof Baz;

I thought it was because of the | being first, but when I added that test it passed. Seems like it's actually because the TSTypeQuery node type is never handled. I'm not sure if this is the right fix, though.

Also kind of relates to #270. Potential crash isn't caught in compile because of non-null assertion on line 216 in rules/no-type-alias.ts, but that seems like a bigger change.

@bradzacher bradzacher changed the title fix(eslint-plugin): fix typeof alias erroring fix(eslint-plugin): no-type-alias: fix typeof alias erroring Mar 27, 2019
@bradzacher bradzacher merged commit cebcfe6 into typescript-eslint:master Mar 27, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants