From c4e78281d73e9a57ff569c675ebeaa0d7c90b2d0 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 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c8c4d55dab8ce..7324eebfb6a53 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; } @@ -26061,15 +26061,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { 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); + // 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 Foo1 = T extends `*${infer U}*` ? U : never; -// type T05 = Foo1<`*${number}*`>; + // type T05 = Foo1<`*${number}*`>; -// type T06 = Foo1<`*${bigint}*`>; + // 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];