-
Notifications
You must be signed in to change notification settings - Fork 13k
Description
When a .d.ts file is included with a .js file (ostensibly created by some .ts file in a galaxy far far away) in order to get intellisense, private class members appear in completions lists. This is probably a bug and we have gotten some feedback from users that they would rather not see this.
A possibly greater pain point is that when the private member shows up in completion, the icon is wrong, I'm guessing because we do not have the full signature for private members in .d.ts files. I believe the lack of full signatures is by design though and I don't believe there is a way to make those members appear method-like without them.
TypeScript Version: 3.6.3
Search Terms:
private completion
Code
.d.ts
// @filename:test.d.ts
/** The 'Test' namespace. */
declare namespace Test {
/** The 'Foo' class.*/
class Foo {
/** Constructor. */
constructor();
/** I'm private: don't use me. */
private MethodOne;
/** I'm public: let's do this. */
MethodTwo(): void;
}
}
.js
// @filename:file.js
var foo = new Test.Foo();
foo.
Expected behavior:
The completion list contains MethodTwo
.
Actual behavior:
The completion list contains MethodOne
and MethodTwo
.