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

feat(typescript-estree): typeof private identifiers #4832

Closed

Conversation

sosukesuzuki
Copy link
Contributor

@sosukesuzuki sosukesuzuki commented Apr 17, 2022

PR Checklist

Overview

Based on #4829

Adds tests for typeof this.#foo

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @sosukesuzuki!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@netlify
Copy link

netlify bot commented Apr 17, 2022

Deploy Preview for typescript-eslint failed.

Name Link
🔨 Latest commit af7b0f3
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/625bf46dc6818b0008efe7cc

import type { EntityName } from '../../unions/EntityName';

export interface TSQualifiedName extends BaseNode {
type: AST_NODE_TYPES.TSQualifiedName;
left: EntityName;
right: Identifier;
right: Identifier | PrivateIdentifier;
Copy link
Member

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 a typeof. 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.

@bradzacher bradzacher added the AST PRs and Issues about the AST structure label Apr 25, 2022
@bradzacher
Copy link
Member

microsoft/TypeScript#48959

They are pulling this feature from 4.7, so we can close this for now.

@bradzacher bradzacher closed this May 5, 2022
@sosukesuzuki sosukesuzuki deleted the typeof-private branch May 5, 2022 03:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AST PRs and Issues about the AST structure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants