From d142aae710fc03c3d0d710a16c52f7ed26b34cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Sat, 16 Mar 2024 21:10:56 +0100 Subject: [PATCH] format --- src/compiler/checker.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c8c4d55dab8ce..29933604d77eb 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -25446,7 +25446,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { arraysEqual((source as TemplateLiteralType).texts, target.texts) ? map((source as TemplateLiteralType).types, (s, i) => { return isTypeAssignableTo(getBaseConstraintOrType(s), getBaseConstraintOrType(target.types[i])) ? s : getStringLikeTypeForType(s); }) : - inferFromLiteralPartsToTemplateLiteral((source as TemplateLiteralType).texts, (source as TemplateLiteralType).types, target) : + inferFromLiteralPartsToTemplateLiteral((source as TemplateLiteralType).texts, (source as TemplateLiteralType).types, target) : undefined; } @@ -26060,16 +26060,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // allowed template literal placeholder types, infer from a literal type corresponding to the constraint. if (source.flags & TypeFlags.StringLiteral && target.flags & TypeFlags.TypeVariable) { const inferenceContext = getInferenceInfoForType(target); - // andarist here??? -// declare function foo1(arg: `*${V}*`): V; -// declare const n: number -// let x5 = foo1(`*${n}*` as const); - -// type Foo1 = T extends `*${infer U}*` ? U : never; - -// type T05 = Foo1<`*${number}*`>; - -// type T06 = Foo1<`*${bigint}*`>; const constraint = inferenceContext ? getBaseConstraintOfType(inferenceContext.typeParameter) : undefined; if (constraint && !isTypeAny(constraint)) { const constraintTypes = constraint.flags & TypeFlags.Union ? (constraint as UnionType).types : [constraint];