-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(typescript-estree): typeof
private identifiers
#4832
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
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b4c9ac9
feat: update to TypeScript 4.7-beta
sosukesuzuki 97d5c79
chore(ast-spec): remove `api-extractor` temporary
sosukesuzuki 7b1c198
feat(types): run `generate:lib`
sosukesuzuki 547d172
chore(typescript-estree): add `ts.TypeQueryNode` to `EstreeToTsNodeTy…
sosukesuzuki cb305c0
fix(utils): fix type errors
sosukesuzuki eb2bcc5
fix(eslint-plugin): avoid syntax errors
sosukesuzuki c390c67
fix(eslint-plugin): avoid type errors
sosukesuzuki 04efb6c
test(typescript-estree): update snapshots
sosukesuzuki ee04ac6
feat(ast-spec): add `PrivateIdentifier` to `TSQualifiedName.right`
sosukesuzuki af7b0f3
test(typescript-estree): add tests for `typeof` private
sosukesuzuki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import type { AST_NODE_TYPES } from '../../ast-node-types'; | ||
import type { BaseNode } from '../../base/BaseNode'; | ||
import type { Identifier } from '../../expression/Identifier/spec'; | ||
import type { PrivateIdentifier } from '../../special/PrivateIdentifier/spec'; | ||
import type { EntityName } from '../../unions/EntityName'; | ||
|
||
export interface TSQualifiedName extends BaseNode { | ||
type: AST_NODE_TYPES.TSQualifiedName; | ||
left: EntityName; | ||
right: Identifier; | ||
right: Identifier | PrivateIdentifier; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// THIS CODE WAS AUTOMATICALLY GENERATED | ||
// DO NOT EDIT THIS CODE BY HAND | ||
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: | ||
// npx nx generate-lib @typescript-eslint/scope-manager | ||
|
||
import { ImplicitLibVariableOptions } from '../variable'; | ||
import { es2020_intl } from './es2020.intl'; | ||
import { TYPE } from './base-config'; | ||
|
||
export const es2020_date = { | ||
...es2020_intl, | ||
Date: TYPE, | ||
} as Record<string, ImplicitLibVariableOptions>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// THIS CODE WAS AUTOMATICALLY GENERATED | ||
// DO NOT EDIT THIS CODE BY HAND | ||
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: | ||
// npx nx generate-lib @typescript-eslint/scope-manager | ||
|
||
import { ImplicitLibVariableOptions } from '../variable'; | ||
import { es2020_intl } from './es2020.intl'; | ||
import { TYPE } from './base-config'; | ||
|
||
export const es2020_number = { | ||
...es2020_intl, | ||
Number: TYPE, | ||
} as Record<string, ImplicitLibVariableOptions>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
NGL - I do hate this a little bit because the only place that
this.#foo
is valid is in atypeof
. It just means that consumers will have to check the type of this even though they'll know it's not possible.It's probably not worth going to the effort of creating a separate AST node just for private member expressions within a type query.