mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 12:32:08 -06:00
Adjust the node builder compatible reference check to handle aliased tuples (#58066)
This commit is contained in:
parent
82897a0c9c
commit
565006c944
@ -8561,7 +8561,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
}
|
||||
|
||||
function existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing: TypeNode, type: Type) {
|
||||
return !(getObjectFlags(type) & ObjectFlags.Reference) || !isTypeReferenceNode(existing) || length(existing.typeArguments) >= getMinTypeArgumentCount((type as TypeReference).target.typeParameters);
|
||||
// In JS, you can say something like `Foo` and get a `Foo<any>` implicitly - we don't want to preserve that original `Foo` in these cases, though.
|
||||
if (!(getObjectFlags(type) & ObjectFlags.Reference)) return true;
|
||||
if (!isTypeReferenceNode(existing)) return true;
|
||||
// `type` is a reference type, and `existing` is a type reference node, but we still need to make sure they refer to the _same_ target type
|
||||
// before we go comparing their type argument counts.
|
||||
void getTypeFromTypeReference(existing); // call to ensure symbol is resolved
|
||||
const symbol = getNodeLinks(existing).resolvedSymbol;
|
||||
const existingTarget = symbol && getDeclaredTypeOfSymbol(symbol);
|
||||
if (!existingTarget || existingTarget !== (type as TypeReference).target) return true;
|
||||
return length(existing.typeArguments) >= getMinTypeArgumentCount((type as TypeReference).target.typeParameters);
|
||||
}
|
||||
|
||||
function getEnclosingDeclarationIgnoringFakeScope(enclosingDeclaration: Node) {
|
||||
|
||||
@ -23,7 +23,7 @@ declare function str(x: string): void;
|
||||
|
||||
declare function f1(...args: Funcs): void;
|
||||
>f1 : (...args: Funcs) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^ ^^^^^
|
||||
>args : Funcs
|
||||
> : ^^^^^
|
||||
|
||||
|
||||
@ -39,13 +39,13 @@ function a3(...a: Array<String>) { }
|
||||
|
||||
function a4(...a: arrayString) { }
|
||||
>a4 : (...a: arrayString) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^ ^^^^^^^^^
|
||||
>a : arrayString
|
||||
> : ^^^^^^^^^^^
|
||||
|
||||
function a5(...a: stringOrNumArray) { }
|
||||
>a5 : (...a: stringOrNumArray) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^ ^^^^^^^^^
|
||||
>a : stringOrNumArray
|
||||
> : ^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@ -39,13 +39,13 @@ function a3(...a: Array<String>) { }
|
||||
|
||||
function a4(...a: arrayString) { }
|
||||
>a4 : (...a: arrayString) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^ ^^^^^^^^^
|
||||
>a : arrayString
|
||||
> : ^^^^^^^^^^^
|
||||
|
||||
function a5(...a: stringOrNumArray) { }
|
||||
>a5 : (...a: stringOrNumArray) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^ ^^^^^^^^^
|
||||
>a : stringOrNumArray
|
||||
> : ^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@ -39,13 +39,13 @@ function a3(...a: Array<String>) { }
|
||||
|
||||
function a4(...a: arrayString) { }
|
||||
>a4 : (...a: arrayString) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^ ^^^^^^^^^
|
||||
>a : arrayString
|
||||
> : ^^^^^^^^^^^
|
||||
|
||||
function a5(...a: stringOrNumArray) { }
|
||||
>a5 : (...a: stringOrNumArray) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^ ^^^^^^^^^
|
||||
>a : stringOrNumArray
|
||||
> : ^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ type T13 = typeof zz
|
||||
|
||||
var zz: { x: T11 }
|
||||
>zz : { x: T11; }
|
||||
> : ^^^^^^^^^^^
|
||||
> : ^^^^^ ^^^
|
||||
>x : T11
|
||||
> : ^^^
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ type T2<T> = [42, T2<{ x: T }>];
|
||||
|
||||
function qq<U>(x: T1<U>, y: T2<U>) {
|
||||
>qq : <U>(x: T1<U>, y: T2<U>) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^ ^^^^^ ^^^^^ ^^^^^^^^^
|
||||
>x : T1<U>
|
||||
> : ^^^^^
|
||||
>y : T2<U>
|
||||
|
||||
@ -176,8 +176,8 @@ declare function f3<T = U, U = T>(a: T, b: U): void;
|
||||
* @template {string | number} [T=string] - ok: defaults are permitted
|
||||
* @typedef {[T]} A
|
||||
*/
|
||||
/** @type {A} */ declare const aDefault1: A<string>;
|
||||
/** @type {A} */ declare const aDefault2: A<string>;
|
||||
/** @type {A} */ declare const aDefault1: A;
|
||||
/** @type {A} */ declare const aDefault2: A;
|
||||
/** @type {A<string>} */ declare const aString: A<string>;
|
||||
/** @type {A<number>} */ declare const aNumber: A<number>;
|
||||
type B<T, U = T> = [T, U];
|
||||
|
||||
@ -7,7 +7,7 @@ export type Point = [number, number];
|
||||
|
||||
export function increment(point: Point) {
|
||||
>increment : (point: Point) => number[]
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^ ^^^^^^^^^^^^^
|
||||
>point : Point
|
||||
> : ^^^^^
|
||||
|
||||
|
||||
@ -272,7 +272,7 @@ interface StringToAnyNumberToNumber extends StringTo<any>, NumberToNumber {
|
||||
|
||||
function f3(sToAny: StringTo<any>, nToNumber: NumberToNumber, strToAnyNumToNum: StringToAnyNumberToNumber, someObj: Obj) {
|
||||
>f3 : (sToAny: StringTo<any>, nToNumber: NumberToNumber, strToAnyNumToNum: StringToAnyNumberToNumber, someObj: Obj) => void
|
||||
> : ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^
|
||||
> : ^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^
|
||||
>sToAny : StringTo<any>
|
||||
> : ^^^^^^^^^^^^^
|
||||
>nToNumber : NumberToNumber
|
||||
|
||||
@ -39,7 +39,7 @@ type T5 = [number, string?, boolean]; // Error
|
||||
|
||||
function f1(t1: T1, t2: T2, t3: T3, t4: T4) {
|
||||
>f1 : (t1: T1, t2: T2, t3: T3, t4: T4) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^ ^^^^^^ ^^^^^^ ^^^^^^ ^^^^^^^^^
|
||||
>t1 : T1
|
||||
> : ^^
|
||||
>t2 : T2
|
||||
|
||||
@ -13,7 +13,7 @@ function fa1(...args: NamedAndAnonymous) {}
|
||||
|
||||
function fa2(a: NamedAndAnonymous, ...args: NamedAndAnonymous) {}
|
||||
>fa2 : (a: NamedAndAnonymous, a: string, args_1: number) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
>a : NamedAndAnonymous
|
||||
> : ^^^^^^^^^^^^^^^^^
|
||||
>args : NamedAndAnonymous
|
||||
@ -31,7 +31,7 @@ function fb1(...args: NamedAnonymousMixed) {}
|
||||
|
||||
function fb2(a: NamedAnonymousMixed, ...args: NamedAnonymousMixed) {}
|
||||
>fb2 : (a: NamedAnonymousMixed, a: string, args_1: number, c: number, args_3: NamedAndAnonymous) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
>a : NamedAnonymousMixed
|
||||
> : ^^^^^^^^^^^^^^^^^^^
|
||||
>args : NamedAnonymousMixed
|
||||
@ -39,7 +39,7 @@ function fb2(a: NamedAnonymousMixed, ...args: NamedAnonymousMixed) {}
|
||||
|
||||
function fb3(a: NamedAnonymousMixed, ...args: NamedAnonymousMixed[3]) {}
|
||||
>fb3 : (a: NamedAnonymousMixed, a: string, args_1: number) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
>a : NamedAnonymousMixed
|
||||
> : ^^^^^^^^^^^^^^^^^^^
|
||||
>args : NamedAndAnonymous
|
||||
|
||||
@ -182,8 +182,8 @@ function f22<N extends number, M extends N>(tn: TupleOf<number, N>, tm: TupleOf<
|
||||
}
|
||||
|
||||
declare function f23<T>(t: TupleOf<T, 3>): T;
|
||||
>f23 : <T>(t: [T, T, T]) => T
|
||||
> : ^ ^^^^^^^^^^^^^^^^^^^
|
||||
>f23 : <T>(t: TupleOf<T, 3>) => T
|
||||
> : ^ ^^^^^ ^^^^^
|
||||
>t : [T, T, T]
|
||||
> : ^^^^^^^^^
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ type tup = [number, number, number, number];
|
||||
|
||||
function foo(arg: Circular<tup>): tup {
|
||||
>foo : (arg: any) => tup
|
||||
> : ^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^^^
|
||||
>arg : any
|
||||
> : ^^^
|
||||
|
||||
|
||||
@ -157,7 +157,7 @@ type T3 = Box<Box<Box<T3>>>;
|
||||
|
||||
function f1(t1: T1, t2: T2, t3: T3) {
|
||||
>f1 : (t1: T1, t2: T2, t3: T3) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^ ^^^^^^ ^^^^^^ ^^^^^^^^^
|
||||
>t1 : T1
|
||||
> : ^^
|
||||
>t2 : T2
|
||||
@ -666,7 +666,7 @@ type Tree = [HTMLHeadingElement, Tree][];
|
||||
|
||||
function parse(node: Tree, index: number[] = []): HTMLUListElement {
|
||||
>parse : (node: Tree, index?: number[]) => HTMLUListElement
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^ ^^^^^
|
||||
> : ^^^^^^^ ^^^^^^^^^^ ^^^^^
|
||||
>node : Tree
|
||||
> : ^^^^
|
||||
>index : number[]
|
||||
@ -800,7 +800,7 @@ function parse(node: Tree, index: number[] = []): HTMLUListElement {
|
||||
|
||||
function cons(hs: HTMLHeadingElement[]): Tree {
|
||||
>cons : (hs: HTMLHeadingElement[]) => Tree
|
||||
> : ^^^^^ ^^^^^^^^^
|
||||
> : ^^^^^ ^^^^^
|
||||
>hs : HTMLHeadingElement[]
|
||||
> : ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ type JsonArray = ReadonlyArray<Json>;
|
||||
type JsonRecord = {
|
||||
readonly [key: string]: Json;
|
||||
};
|
||||
type Json = boolean | number | string | null | JsonRecord | readonly Json[] | readonly [];
|
||||
type Json = boolean | number | string | null | JsonRecord | JsonArray | readonly [];
|
||||
/**
|
||||
* <T>
|
||||
*/
|
||||
|
||||
@ -28,7 +28,7 @@ var robotA: Robot = [1, "mower", "mowing"];
|
||||
|
||||
function foo1([, nameA]: Robot) {
|
||||
>foo1 : ([, nameA]: Robot) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^ ^^^^^^^^^
|
||||
> : undefined
|
||||
> : ^^^^^^^^^
|
||||
>nameA : string
|
||||
@ -49,7 +49,7 @@ function foo1([, nameA]: Robot) {
|
||||
|
||||
function foo2([numberB]: Robot) {
|
||||
>foo2 : ([numberB]: Robot) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^ ^^^^^^^^^
|
||||
>numberB : number
|
||||
> : ^^^^^^
|
||||
|
||||
@ -68,7 +68,7 @@ function foo2([numberB]: Robot) {
|
||||
|
||||
function foo3([numberA2, nameA2, skillA2]: Robot) {
|
||||
>foo3 : ([numberA2, nameA2, skillA2]: Robot) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^
|
||||
>numberA2 : number
|
||||
> : ^^^^^^
|
||||
>nameA2 : string
|
||||
@ -91,7 +91,7 @@ function foo3([numberA2, nameA2, skillA2]: Robot) {
|
||||
|
||||
function foo4([numberA3, ...robotAInfo]: Robot) {
|
||||
>foo4 : ([numberA3, ...robotAInfo]: Robot) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^
|
||||
>numberA3 : number
|
||||
> : ^^^^^^
|
||||
>robotAInfo : [string, string]
|
||||
|
||||
@ -30,7 +30,7 @@ var robotA: Robot = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
function foo1([, skillA]: Robot) {
|
||||
>foo1 : ([, skillA]: Robot) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^^ ^^^^^^^^^
|
||||
> : undefined
|
||||
> : ^^^^^^^^^
|
||||
>skillA : [string, string]
|
||||
@ -51,7 +51,7 @@ function foo1([, skillA]: Robot) {
|
||||
|
||||
function foo2([nameMB]: Robot) {
|
||||
>foo2 : ([nameMB]: Robot) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^ ^^^^^^^^^
|
||||
>nameMB : string
|
||||
> : ^^^^^^
|
||||
|
||||
@ -70,7 +70,7 @@ function foo2([nameMB]: Robot) {
|
||||
|
||||
function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) {
|
||||
>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: Robot) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^
|
||||
>nameMA : string
|
||||
> : ^^^^^^
|
||||
>primarySkillA : string
|
||||
@ -93,7 +93,7 @@ function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) {
|
||||
|
||||
function foo4([...multiRobotAInfo]: Robot) {
|
||||
>foo4 : ([...multiRobotAInfo]: Robot) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^
|
||||
>multiRobotAInfo : [string, [string, string]]
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ var robotA: Robot = [1, "mower", "mowing"];
|
||||
|
||||
function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) {
|
||||
>foo1 : ([, nameA]?: Robot) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^^ ^^^^^^^^^
|
||||
> : undefined
|
||||
> : ^^^^^^^^^
|
||||
>nameA : string
|
||||
@ -61,7 +61,7 @@ function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) {
|
||||
>foo2 : ([numberB]?: Robot) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^^ ^^^^^^^^^
|
||||
>numberB : number
|
||||
> : ^^^^^^
|
||||
>-1 : -1
|
||||
@ -94,7 +94,7 @@ function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) {
|
||||
>foo3 : ([numberA2, nameA2, skillA2]?: Robot) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^
|
||||
>numberA2 : number
|
||||
> : ^^^^^^
|
||||
>-1 : -1
|
||||
@ -135,7 +135,7 @@ function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1,
|
||||
|
||||
function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) {
|
||||
>foo4 : ([numberA3, ...robotAInfo]?: Robot) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^
|
||||
>numberA3 : number
|
||||
> : ^^^^^^
|
||||
>-1 : -1
|
||||
|
||||
@ -30,7 +30,7 @@ var robotA: Robot = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) {
|
||||
>foo1 : ([, skillA]?: Robot) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^^^ ^^^^^^^^^
|
||||
> : undefined
|
||||
> : ^^^^^^^^^
|
||||
>skillA : string[]
|
||||
@ -67,7 +67,7 @@ function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "s
|
||||
|
||||
function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) {
|
||||
>foo2 : ([nameMB]?: Robot) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^ ^^^^^^^^^
|
||||
>nameMB : string
|
||||
> : ^^^^^^
|
||||
>"noName" : "noName"
|
||||
@ -98,7 +98,7 @@ function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) {
|
||||
|
||||
function foo3([nameMA = "noName", [
|
||||
>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: Robot) => void
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^
|
||||
>nameMA : string
|
||||
> : ^^^^^^
|
||||
>"noName" : "noName"
|
||||
|
||||
@ -264,7 +264,7 @@ type StringAndBoolean = [string, boolean]
|
||||
|
||||
declare function f16(s: StringAndBoolean): string;
|
||||
>f16 : (s: StringAndBoolean) => string
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^ ^^^^^
|
||||
>s : StringAndBoolean
|
||||
> : ^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@ -78,9 +78,9 @@ function isResponseInData<T>(value: T | { data: T}): value is { data: T } {
|
||||
|
||||
function getResults1(value: Results | { data: Results }): Results {
|
||||
>getResults1 : (value: Results | { data: Results; }) => Results
|
||||
> : ^^^^^^^^ ^^^^^^^^^^^^
|
||||
> : ^^^^^^^^ ^^^^^
|
||||
>value : Results | { data: Results; }
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^^^^^^^ ^^^
|
||||
>data : Results
|
||||
> : ^^^^^^^
|
||||
|
||||
@ -128,9 +128,9 @@ function isPlainResponse<T>(value: T | { data: T}): value is T {
|
||||
|
||||
function getResults2(value: Results | { data: Results }): Results {
|
||||
>getResults2 : (value: Results | { data: Results; }) => Results
|
||||
> : ^^^^^^^^ ^^^^^^^^^^^^
|
||||
> : ^^^^^^^^ ^^^^^
|
||||
>value : Results | { data: Results; }
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> : ^^^^^^^^^^^^^^^^^^ ^^^
|
||||
>data : Results
|
||||
> : ^^^^^^^
|
||||
|
||||
|
||||
@ -83,7 +83,7 @@ type T4N = T4[number]; // string | number | boolean
|
||||
|
||||
function f1(t1: T1, t2: T2, t3: T3, t4: T4, x: number) {
|
||||
>f1 : (t1: T1, t2: T2, t3: T3, t4: T4, x: number) => void
|
||||
> : ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^
|
||||
> : ^^^^^ ^^^^^^ ^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^
|
||||
>t1 : T1
|
||||
> : ^^
|
||||
>t2 : T2
|
||||
|
||||
@ -685,8 +685,8 @@ type TP2<T extends unknown[]> = Partial<[string, ...T, ...number[]]>; // [strin
|
||||
// Reverse mapping through mapped type applied to variadic tuple type
|
||||
|
||||
declare function fm1<T extends unknown[]>(t: Arrayify<[string, number, ...T]>): T;
|
||||
>fm1 : <T extends unknown[]>(t: [string[], number[], ...Arrayify<T>]) => T
|
||||
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
>fm1 : <T extends unknown[]>(t: Arrayify<[string, number, ...T]>) => T
|
||||
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^
|
||||
>t : [string[], number[], ...Arrayify<T>]
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user