No auto-completion on typescript interface with classes implement
See original GitHub issueRedirected by https://github.com/microsoft/vscode-cpptools/issues/3789
Type: LanguageService Describe the bug
- macOS Mojave 10.14.5
- VSCODE : 1.35.1
- TS 3.5.1
To Reproduce
Create a file with the following :
import { Strategy } from "passport-local";
class SSOPlugin implements Plugin {
constructor() {}
init() {}
}
interface Plugin {
authenticators?: Record<string, any>;
strategies: { [key: string]: KuzzleStrategy };
}
interface KuzzleStrategy {
config: {
authenticator: string;
fields: string[];
};
methods: {
afterRegister?: () => any;
create: () => any;
delete: () => any;
exists: () => any;
getById?: () => any;
getInfo?: () => any;
update: () => any;
validate: () => any;
verify: () => any;
};
}
export = SSOPlugin;
In constructor or any method using this.
and auto-completion doesn’t give anything.
But if I give the wrong types, the compiler complain (also red line on IDE).
Expected behavior
I should get auto-completion.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
class - How to let VSCode/Typescript to do auto complete on ...
//I tried implementing interface, but it won't help, with or without the interface interface FooInterface { bar: Function } class Foo ...
Read more >Working with JavaScript in Visual Studio Code
Using the TypeScript language service, VS Code can provide smart completions (IntelliSense) as well as type checking for JavaScript.
Read more >Code completion | WebStorm Documentation - JetBrains
To show you completion suggestions, WebStorm goes through the project files with the source code and adds classes, methods, functions, ...
Read more >JavaScript IntelliSense - Visual Studio - Microsoft Learn
ts file (see TypeScript documentation), and types such as interfaces and classes declared in TypeScript are available for use as types in JsDoc ......
Read more >Place Autocomplete | Maps JavaScript API - Google Developers
To retrieve predictions programmatically, use the AutocompleteService class. AutocompleteService does not add any UI controls. Instead, it returns an array of ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks.
Minimal example:
|
y
shownHello all, any news on that? I’m experiencing it using NestJS CustomScalar interface… Get complicated 😅
@RyanCavanaugh @mjbvz Maybe you have some ideas, not exactly the same issue as reported above
For not having
ast
considered as any, is have toparseLiteral(ast: ValueNode) {