mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Accept new baselines
This commit is contained in:
@@ -15,6 +15,16 @@ const x1 = f1(fo, fs); // (x: string) => void
|
||||
const x2 = f2("abc", fo, fs); // "abc"
|
||||
const x3 = f3("abc", fo, fx); // "abc" | "def"
|
||||
const x4 = f4(fo, fs); // Func<string>
|
||||
|
||||
declare const never: never;
|
||||
|
||||
const x10 = f2(never, fo, fs); // string
|
||||
const x11 = f3(never, fo, fx); // "def"
|
||||
|
||||
// Repro from #21112
|
||||
|
||||
declare function foo<T>(a: ReadonlyArray<T>): T;
|
||||
let x = foo([]); // never
|
||||
|
||||
|
||||
//// [strictFunctionTypes1.js]
|
||||
@@ -23,6 +33,9 @@ var x1 = f1(fo, fs); // (x: string) => void
|
||||
var x2 = f2("abc", fo, fs); // "abc"
|
||||
var x3 = f3("abc", fo, fx); // "abc" | "def"
|
||||
var x4 = f4(fo, fs); // Func<string>
|
||||
var x10 = f2(never, fo, fs); // string
|
||||
var x11 = f3(never, fo, fx); // "def"
|
||||
var x = foo([]); // never
|
||||
|
||||
|
||||
//// [strictFunctionTypes1.d.ts]
|
||||
@@ -40,3 +53,8 @@ declare const x1: (x: string) => void;
|
||||
declare const x2 = "abc";
|
||||
declare const x3: string;
|
||||
declare const x4: Func<string>;
|
||||
declare const never: never;
|
||||
declare const x10: string;
|
||||
declare const x11: "def";
|
||||
declare function foo<T>(a: ReadonlyArray<T>): T;
|
||||
declare let x: never;
|
||||
|
||||
@@ -94,3 +94,34 @@ const x4 = f4(fo, fs); // Func<string>
|
||||
>fo : Symbol(fo, Decl(strictFunctionTypes1.ts, 6, 58))
|
||||
>fs : Symbol(fs, Decl(strictFunctionTypes1.ts, 8, 37))
|
||||
|
||||
declare const never: never;
|
||||
>never : Symbol(never, Decl(strictFunctionTypes1.ts, 17, 13))
|
||||
|
||||
const x10 = f2(never, fo, fs); // string
|
||||
>x10 : Symbol(x10, Decl(strictFunctionTypes1.ts, 19, 5))
|
||||
>f2 : Symbol(f2, Decl(strictFunctionTypes1.ts, 0, 79))
|
||||
>never : Symbol(never, Decl(strictFunctionTypes1.ts, 17, 13))
|
||||
>fo : Symbol(fo, Decl(strictFunctionTypes1.ts, 6, 58))
|
||||
>fs : Symbol(fs, Decl(strictFunctionTypes1.ts, 8, 37))
|
||||
|
||||
const x11 = f3(never, fo, fx); // "def"
|
||||
>x11 : Symbol(x11, Decl(strictFunctionTypes1.ts, 20, 5))
|
||||
>f3 : Symbol(f3, Decl(strictFunctionTypes1.ts, 1, 74))
|
||||
>never : Symbol(never, Decl(strictFunctionTypes1.ts, 17, 13))
|
||||
>fo : Symbol(fo, Decl(strictFunctionTypes1.ts, 6, 58))
|
||||
>fx : Symbol(fx, Decl(strictFunctionTypes1.ts, 9, 37))
|
||||
|
||||
// Repro from #21112
|
||||
|
||||
declare function foo<T>(a: ReadonlyArray<T>): T;
|
||||
>foo : Symbol(foo, Decl(strictFunctionTypes1.ts, 20, 30))
|
||||
>T : Symbol(T, Decl(strictFunctionTypes1.ts, 24, 21))
|
||||
>a : Symbol(a, Decl(strictFunctionTypes1.ts, 24, 24))
|
||||
>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.d.ts, --, --))
|
||||
>T : Symbol(T, Decl(strictFunctionTypes1.ts, 24, 21))
|
||||
>T : Symbol(T, Decl(strictFunctionTypes1.ts, 24, 21))
|
||||
|
||||
let x = foo([]); // never
|
||||
>x : Symbol(x, Decl(strictFunctionTypes1.ts, 25, 3))
|
||||
>foo : Symbol(foo, Decl(strictFunctionTypes1.ts, 20, 30))
|
||||
|
||||
|
||||
@@ -100,3 +100,38 @@ const x4 = f4(fo, fs); // Func<string>
|
||||
>fo : (x: Object) => void
|
||||
>fs : (x: string) => void
|
||||
|
||||
declare const never: never;
|
||||
>never : never
|
||||
|
||||
const x10 = f2(never, fo, fs); // string
|
||||
>x10 : string
|
||||
>f2(never, fo, fs) : string
|
||||
>f2 : <T>(obj: T, f1: (x: T) => void, f2: (x: T) => void) => T
|
||||
>never : never
|
||||
>fo : (x: Object) => void
|
||||
>fs : (x: string) => void
|
||||
|
||||
const x11 = f3(never, fo, fx); // "def"
|
||||
>x11 : "def"
|
||||
>f3(never, fo, fx) : "def"
|
||||
>f3 : <T>(obj: T, f1: (x: T) => void, f2: (f: (x: T) => void) => void) => T
|
||||
>never : never
|
||||
>fo : (x: Object) => void
|
||||
>fx : (f: (x: "def") => void) => void
|
||||
|
||||
// Repro from #21112
|
||||
|
||||
declare function foo<T>(a: ReadonlyArray<T>): T;
|
||||
>foo : <T>(a: ReadonlyArray<T>) => T
|
||||
>T : T
|
||||
>a : ReadonlyArray<T>
|
||||
>ReadonlyArray : ReadonlyArray<T>
|
||||
>T : T
|
||||
>T : T
|
||||
|
||||
let x = foo([]); // never
|
||||
>x : never
|
||||
>foo([]) : never
|
||||
>foo : <T>(a: ReadonlyArray<T>) => T
|
||||
>[] : never[]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user