Skip to content

fix(38463): No indexed access completions after Record<...> #38481

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

Merged
merged 4 commits into from
May 21, 2020

Conversation

a-tarasyuk
Copy link
Contributor

Fixes #38463

@DanielRosenwasser
Copy link
Member

@typescript-bot pack this

@DanielRosenwasser
Copy link
Member

Does this also fix #38667?

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 20, 2020

Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at 453b1dd. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 20, 2020

Hey @DanielRosenwasser, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/74425/artifacts?artifactName=tgz&fileId=C30B5A5C71CC8F6D612F8A75119A31612247E496E99026FB8C3A981C16BF8E0502&fileName=/typescript-4.0.0-insiders.20200520.tgz"
    }
}

and then running npm install.


There is also a playground for this build.

@a-tarasyuk
Copy link
Contributor Author

a-tarasyuk commented May 20, 2020

@DanielRosenwasser

Does this also fix #38667?

It seems, yes.

Screenshot 2020-05-20 at 09 50 54

The problem is filtering private identifiers because to check if a property is a private identifier, completions use.valueDeclaration, which in some cases may be undefined. I'm not sure that even we need to use prop.syntheticOrigin.valueDeclaration, maybe just checking for .valueDeclaration` is enough. What do you think?

@DanielRosenwasser
Copy link
Member

I think valueDeclaration should be enough - I'd give it a shot.

It seems, yes.

Would be super grateful if you could add it as a test. 🙂

@sandersn sandersn added For Backlog Bug PRs that fix a backlog bug For Milestone Bug PRs that fix a bug with a specific milestone and removed For Backlog Bug PRs that fix a backlog bug labels May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Milestone Bug PRs that fix a bug with a specific milestone
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

No indexed access completions after Record<...>
4 participants