Skip to content

Commit 33f2596

Browse files
Marked internal createAnonymousType type as allowing undefined Symbols
1 parent 36c87ac commit 33f2596

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/compiler/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3506,7 +3506,7 @@ namespace ts {
35063506
/* @internal */ createPromiseType(type: Type): Type;
35073507

35083508
/* @internal */ isTypeAssignableTo(source: Type, target: Type): boolean;
3509-
/* @internal */ createAnonymousType(symbol: Symbol, members: SymbolTable, callSignatures: Signature[], constructSignatures: Signature[], stringIndexInfo: IndexInfo | undefined, numberIndexInfo: IndexInfo | undefined): Type;
3509+
/* @internal */ createAnonymousType(symbol: Symbol | undefined, members: SymbolTable, callSignatures: Signature[], constructSignatures: Signature[], stringIndexInfo: IndexInfo | undefined, numberIndexInfo: IndexInfo | undefined): Type;
35103510
/* @internal */ createSignature(
35113511
declaration: SignatureDeclaration,
35123512
typeParameters: TypeParameter[] | undefined,

src/services/codefixes/inferFromUsage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ namespace ts.codefix {
992992
const callSignatures: Signature[] = usage.calls ? [getSignatureFromCalls(usage.calls)] : [];
993993
const constructSignatures: Signature[] = usage.constructs ? [getSignatureFromCalls(usage.constructs)] : [];
994994
const stringIndexInfo = usage.stringIndex && checker.createIndexInfo(combineFromUsage(usage.stringIndex), /*isReadonly*/ false);
995-
return checker.createAnonymousType(/*symbol*/ undefined!, members, callSignatures, constructSignatures, stringIndexInfo, /*numberIndexInfo*/ undefined); // TODO: GH#18217
995+
return checker.createAnonymousType(/*symbol*/ undefined, members, callSignatures, constructSignatures, stringIndexInfo, /*numberIndexInfo*/ undefined);
996996
}
997997

998998
function inferNamedTypesFromProperties(usage: Usage): Type[] {

0 commit comments

Comments
 (0)