Skip to content

Commit 2e51a07

Browse files
committed
Update baselines.
1 parent 664c4d9 commit 2e51a07

20 files changed

+316
-748
lines changed

tests/baselines/reference/conditionalTypes1.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,10 +499,9 @@ declare type T15 = Extract<Options, {
499499
declare function f5<T extends Options, K extends string>(p: K): Extract<T, {
500500
k: K;
501501
}>;
502-
declare let x0: {
502+
declare let x0: Extract<T, {
503503
k: "a";
504-
a: number;
505-
};
504+
}>;
506505
declare type OptionsOfKind<K extends Options["k"]> = Extract<Options, {
507506
k: K;
508507
}>;

tests/baselines/reference/conditionalTypes1.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ declare function f5<T extends Options, K extends string>(p: K): Extract<T, { k:
187187
>K : K
188188

189189
let x0 = f5("a"); // { k: "a", a: number }
190-
>x0 : { k: "a"; a: number; }
191-
>f5("a") : { k: "a"; a: number; }
190+
>x0 : Extract<T, { k: "a"; }>
191+
>f5("a") : Extract<T, { k: "a"; }>
192192
>f5 : <T extends Options, K extends string>(p: K) => Extract<T, { k: K; }>
193193
>"a" : "a"
194194

tests/baselines/reference/contextualTypingOfTooShortOverloads.types

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ var use: Overload;
77
use((req, res) => {});
88
>use((req, res) => {}) : void
99
>use : Overload
10-
>(req, res) => {} : (req: any, res: any) => void
11-
>req : any
12-
>res : any
10+
>(req, res) => {} : (req: number, res: number) => void
11+
>req : number
12+
>res : number
1313

1414
interface Overload {
1515
>Overload : Overload
@@ -33,11 +33,11 @@ app.use((err: any, req, res, next) => { return; });
3333
>app.use : IRouterHandler<MyApp> & IRouterMatcher<MyApp>
3434
>app : MyApp
3535
>use : IRouterHandler<MyApp> & IRouterMatcher<MyApp>
36-
>(err: any, req, res, next) => { return; } : (err: any, req: any, res: any, next: any) => void
36+
>(err: any, req, res, next) => { return; } : (err: any, req: Request, res: Response, next: NextFunction) => void
3737
>err : any
38-
>req : any
39-
>res : any
40-
>next : any
38+
>req : Request
39+
>res : Response
40+
>next : NextFunction
4141

4242

4343
interface MyApp {

tests/baselines/reference/genericContextualTypes1.types

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ const f02: <A>(x: A) => A[] = wrap(list);
136136
>x : A
137137
>A : A
138138
>A : A
139-
>wrap(list) : (a: A) => A[]
139+
>wrap(list) : <A>(a: A) => A[]
140140
>wrap : <A, B>(f: (a: A) => B) => (a: A) => B
141141
>list : <T>(a: T) => T[]
142142

@@ -180,7 +180,7 @@ const f11: <T>(x: T) => Box<T[]> = compose(list, box);
180180
>T : T
181181
>Box : Box<T>
182182
>T : T
183-
>compose(list, box) : (a: T) => Box<T[]>
183+
>compose(list, box) : <T>(a: T) => Box<T[]>
184184
>compose : <A, B, C>(f: (a: A) => B, g: (b: B) => C) => (a: A) => C
185185
>list : <T>(a: T) => T[]
186186
>box : <V>(x: V) => Box<V>
@@ -212,7 +212,7 @@ const f13: <T>(x: Box<T[]>) => T = compose(unbox, unlist);
212212
>Box : Box<T>
213213
>T : T
214214
>T : T
215-
>compose(unbox, unlist) : (a: Box<T[]>) => T
215+
>compose(unbox, unlist) : <T>(a: Box<T[]>) => T
216216
>compose : <A, B, C>(f: (a: A) => B, g: (b: B) => C) => (a: A) => C
217217
>unbox : <W>(x: Box<W>) => W
218218
>unlist : <T>(a: T[]) => T
@@ -281,7 +281,7 @@ const f22: <A>(a: A[]) => A[] = arrayMap(identity);
281281
>a : A[]
282282
>A : A
283283
>A : A
284-
>arrayMap(identity) : (a: A[]) => A[]
284+
>arrayMap(identity) : <A>(a: A[]) => A[]
285285
>arrayMap : <T, U>(f: (x: T) => U) => (a: T[]) => U[]
286286
>identity : <T>(x: T) => T
287287

@@ -340,7 +340,7 @@ const f40: <A, B>(b: B, a: A) => [A, B] = flip(zip);
340340
>A : A
341341
>A : A
342342
>B : B
343-
>flip(zip) : (y: B, x: A) => [A, B]
343+
>flip(zip) : <A, B>(y: B, x: A) => [A, B]
344344
>flip : <X, Y, Z>(f: (x: X, y: Y) => Z) => (y: Y, x: X) => Z
345345
>zip : <A, B>(a: A, b: B) => [A, B]
346346

tests/baselines/reference/genericTypeParameterEquivalence2strict.errors.txt

Lines changed: 0 additions & 89 deletions
This file was deleted.

tests/baselines/reference/genericTypeParameterEquivalence2strict.types

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ function curry1<A, B, C>(f: (a: A, b: B) => C): (ax: A) => (bx: B) => C {
161161
}
162162

163163
var cfilter = curry1(filter);
164-
>cfilter : any
165-
>curry1(filter) : any
164+
>cfilter : <A>(ax: (a: A) => boolean) => (bx: A[]) => A[]
165+
>curry1(filter) : <A>(ax: (a: A) => boolean) => (bx: A[]) => A[]
166166
>curry1 : <A, B, C>(f: (a: A, b: B) => C) => (ax: A) => (bx: B) => C
167167
>filter : <A>(f: (a: A) => boolean, ar: A[]) => A[]
168168

@@ -171,26 +171,26 @@ declare function strBool(str: string): boolean
171171
>str : string
172172

173173
const filterer = cfilter(strBool);
174-
>filterer : any
175-
>cfilter(strBool) : any
176-
>cfilter : any
174+
>filterer : (bx: string[]) => string[]
175+
>cfilter(strBool) : (bx: string[]) => string[]
176+
>cfilter : <A>(ax: (a: A) => boolean) => (bx: A[]) => A[]
177177
>strBool : (str: string) => boolean
178178

179179
const expectFilterer: (a: string[]) => string[] = filterer;
180180
>expectFilterer : (a: string[]) => string[]
181181
>a : string[]
182-
>filterer : any
182+
>filterer : (bx: string[]) => string[]
183183

184184
const filtered = filterer(["hello"]);
185-
>filtered : any
186-
>filterer(["hello"]) : any
187-
>filterer : any
185+
>filtered : string[]
186+
>filterer(["hello"]) : string[]
187+
>filterer : (bx: string[]) => string[]
188188
>["hello"] : string[]
189189
>"hello" : "hello"
190190

191191
const expectFiltered: string[] = filtered;
192192
>expectFiltered : string[]
193-
>filtered : any
193+
>filtered : string[]
194194

195195
// compose :: (b->c) -> (a->b) -> (a->c)
196196
// length :: [a] -> Num
@@ -210,11 +210,11 @@ function countWhere_1<A>(pred: (a: A) => boolean): (a: A[]) => number {
210210
>A : A
211211

212212
return compose(length2, cfilter(pred));
213-
>compose(length2, cfilter(pred)) : any
213+
>compose(length2, cfilter(pred)) : (a: A[]) => number
214214
>compose : <A, B, C>(f: (b: B) => C, g: (a: A) => B) => (a: A) => C
215215
>length2 : <A>(ar: A[]) => number
216-
>cfilter(pred) : any
217-
>cfilter : any
216+
>cfilter(pred) : (bx: A[]) => A[]
217+
>cfilter : <A>(ax: (a: A) => boolean) => (bx: A[]) => A[]
218218
>pred : (a: A) => boolean
219219
}
220220

@@ -228,14 +228,14 @@ function countWhere_2<A>(pred: (a: A) => boolean): (a: A[]) => number {
228228
>A : A
229229

230230
var where = cfilter(pred);
231-
>where : any
232-
>cfilter(pred) : any
233-
>cfilter : any
231+
>where : (bx: A[]) => A[]
232+
>cfilter(pred) : (bx: A[]) => A[]
233+
>cfilter : <A>(ax: (a: A) => boolean) => (bx: A[]) => A[]
234234
>pred : (a: A) => boolean
235235

236236
return compose(length2, where);
237-
>compose(length2, where) : any
237+
>compose(length2, where) : (a: A[]) => number
238238
>compose : <A, B, C>(f: (b: B) => C, g: (a: A) => B) => (a: A) => C
239239
>length2 : <A>(ar: A[]) => number
240-
>where : any
240+
>where : (bx: A[]) => A[]
241241
}

tests/baselines/reference/inferTypes1.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ type T12 = ReturnType<(<T>() => T)>; // {}
9494
>T : T
9595

9696
type T13 = ReturnType<(<T extends U, U extends number[]>() => T)>; // number[]
97-
>T13 : number[]
97+
>T13 : ReturnType<(<T extends U, U extends number[]>() => T)>
9898
>ReturnType : ReturnType<T>
9999
>T : T
100100
>U : U

tests/baselines/reference/inferentialTypingWithFunctionTypeZip.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ var zipWith: <T, S, U>(a: T[], b: S[], f: (x: T) => (y: S) => U) => U[];
3030
>U : U
3131

3232
var result = zipWith([1, 2], ['a', 'b'], pair);
33-
>result : { x: number; y: {}; }[]
34-
>zipWith([1, 2], ['a', 'b'], pair) : { x: number; y: {}; }[]
33+
>result : { x: number; y: string; }[]
34+
>zipWith([1, 2], ['a', 'b'], pair) : { x: number; y: string; }[]
3535
>zipWith : <T, S, U>(a: T[], b: S[], f: (x: T) => (y: S) => U) => U[]
3636
>[1, 2] : number[]
3737
>1 : 1
@@ -44,8 +44,8 @@ var result = zipWith([1, 2], ['a', 'b'], pair);
4444
var i = result[0].x; // number
4545
>i : number
4646
>result[0].x : number
47-
>result[0] : { x: number; y: {}; }
48-
>result : { x: number; y: {}; }[]
47+
>result[0] : { x: number; y: string; }
48+
>result : { x: number; y: string; }[]
4949
>0 : 0
5050
>x : number
5151

tests/baselines/reference/inferringGenericFunctionsFromGenericFunctions.errors.txt

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)