Skip to content

Commit 88633db

Browse files
committed
Handle case when value signature is undefined
1 parent 742ab0a commit 88633db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/FileIndexer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ export class FileIndexer {
461461
(ts.isPropertyDeclaration(declaration) && declaration.questionToken) ||
462462
(ts.isPropertySignature(declaration) && declaration.questionToken)
463463
)
464-
if (isOptional) {
464+
if (isOptional && signature.value_signature.tpe !== undefined) {
465465
signature.value_signature.tpe = this.makeOptional(
466466
signature.value_signature.tpe
467467
)

0 commit comments

Comments
 (0)