We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e07d788 commit 6a05d4bCopy full SHA for 6a05d4b
packages/ts-autocomplete/src/index.ts
@@ -58,7 +58,7 @@ function mapCompletions(completions: ts.CompletionInfo) {
58
return completions.entries.map((entry) => {
59
const declarations = entry.symbol?.getDeclarations();
60
let type = 'any';
61
- if (declarations && declarations[0]) {
+ if (declarations?.[0]) {
62
const decl = declarations[0];
63
type = decl.getChildAt(2)?.getFullText()?.trim() ?? 'any';
64
}
0 commit comments