Skip to content

Commit 32e8f8b

Browse files
authored
feat(60475): Add getUnknownType to checker api (#60502)
1 parent 7901a39 commit 32e8f8b

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1824,6 +1824,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
18241824
getNumberLiteralType,
18251825
getBigIntType: () => bigintType,
18261826
getBigIntLiteralType,
1827+
getUnknownType: () => unknownType,
18271828
createPromiseType,
18281829
createArrayType,
18291830
getElementTypeOfArrayType,

src/compiler/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5263,6 +5263,7 @@ export interface TypeChecker {
52635263
getBigIntType(): Type;
52645264
getBigIntLiteralType(value: PseudoBigInt): BigIntLiteralType;
52655265
getBooleanType(): Type;
5266+
getUnknownType(): Type;
52665267
/* eslint-disable @typescript-eslint/unified-signatures */
52675268
/** @internal */
52685269
getFalseType(fresh?: boolean): Type;

tests/baselines/reference/api/typescript.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6288,6 +6288,7 @@ declare namespace ts {
62886288
getBigIntType(): Type;
62896289
getBigIntLiteralType(value: PseudoBigInt): BigIntLiteralType;
62906290
getBooleanType(): Type;
6291+
getUnknownType(): Type;
62916292
getFalseType(): Type;
62926293
getTrueType(): Type;
62936294
getVoidType(): Type;

0 commit comments

Comments
 (0)