Skip to content

Commit 6a05d4b

Browse files
lerouxbaddaleax
andauthored
Update packages/ts-autocomplete/src/index.ts
Co-authored-by: Anna Henningsen <[email protected]>
1 parent e07d788 commit 6a05d4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/ts-autocomplete/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function mapCompletions(completions: ts.CompletionInfo) {
5858
return completions.entries.map((entry) => {
5959
const declarations = entry.symbol?.getDeclarations();
6060
let type = 'any';
61-
if (declarations && declarations[0]) {
61+
if (declarations?.[0]) {
6262
const decl = declarations[0];
6363
type = decl.getChildAt(2)?.getFullText()?.trim() ?? 'any';
6464
}

0 commit comments

Comments
 (0)