Skip to content

getAllPossiblePropertiesOfTypes: Skip primitives#15910

Merged
2 commits merged into
masterfrom
primitives
May 17, 2017
Merged

getAllPossiblePropertiesOfTypes: Skip primitives#15910
2 commits merged into
masterfrom
primitives

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented May 17, 2017

Fixes #15894

verify.completionListContains("c", "(property) c: string");

goTo.marker("f");
verify.completionListContains("a", "(property) a: number");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth adding something with T | null and T|undefined to make sure we do not break these in the future.

Copy link
Copy Markdown
Author

@ghost ghost May 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean like this?

function g<T>(x: T | null) {}
g({ /*completion*/ });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no i meant:

function g(x: {a: number} | null) {}
g({   | /* should see "a" */ })

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be handled by the first test then. Added | undefined too.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry did not see that earlier. thanks!

@ghost ghost merged commit 5e20c1c into master May 17, 2017
@ghost ghost deleted the primitives branch May 17, 2017 20:11
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
This pull request was closed.
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.

2 participants