mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-12 23:36:28 -05:00
Accept new baselines
This commit is contained in:
12
tests/baselines/reference/unionAndIntersectionInference3.js
Normal file
12
tests/baselines/reference/unionAndIntersectionInference3.js
Normal file
@@ -0,0 +1,12 @@
|
||||
//// [unionAndIntersectionInference3.ts]
|
||||
// Repro from #30720
|
||||
|
||||
type Maybe<T> = T | undefined;
|
||||
declare function concatMaybe<T>(...args: (Maybe<T> | Maybe<T>[])[]): T[];
|
||||
concatMaybe([1, 2, 3], 4);
|
||||
|
||||
|
||||
//// [unionAndIntersectionInference3.js]
|
||||
"use strict";
|
||||
// Repro from #30720
|
||||
concatMaybe([1, 2, 3], 4);
|
||||
@@ -0,0 +1,21 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.ts ===
|
||||
// Repro from #30720
|
||||
|
||||
type Maybe<T> = T | undefined;
|
||||
>Maybe : Symbol(Maybe, Decl(unionAndIntersectionInference3.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(unionAndIntersectionInference3.ts, 2, 11))
|
||||
>T : Symbol(T, Decl(unionAndIntersectionInference3.ts, 2, 11))
|
||||
|
||||
declare function concatMaybe<T>(...args: (Maybe<T> | Maybe<T>[])[]): T[];
|
||||
>concatMaybe : Symbol(concatMaybe, Decl(unionAndIntersectionInference3.ts, 2, 30))
|
||||
>T : Symbol(T, Decl(unionAndIntersectionInference3.ts, 3, 29))
|
||||
>args : Symbol(args, Decl(unionAndIntersectionInference3.ts, 3, 32))
|
||||
>Maybe : Symbol(Maybe, Decl(unionAndIntersectionInference3.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(unionAndIntersectionInference3.ts, 3, 29))
|
||||
>Maybe : Symbol(Maybe, Decl(unionAndIntersectionInference3.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(unionAndIntersectionInference3.ts, 3, 29))
|
||||
>T : Symbol(T, Decl(unionAndIntersectionInference3.ts, 3, 29))
|
||||
|
||||
concatMaybe([1, 2, 3], 4);
|
||||
>concatMaybe : Symbol(concatMaybe, Decl(unionAndIntersectionInference3.ts, 2, 30))
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.ts ===
|
||||
// Repro from #30720
|
||||
|
||||
type Maybe<T> = T | undefined;
|
||||
>Maybe : Maybe<T>
|
||||
|
||||
declare function concatMaybe<T>(...args: (Maybe<T> | Maybe<T>[])[]): T[];
|
||||
>concatMaybe : <T>(...args: (T | Maybe<T>[] | undefined)[]) => T[]
|
||||
>args : (T | Maybe<T>[] | undefined)[]
|
||||
|
||||
concatMaybe([1, 2, 3], 4);
|
||||
>concatMaybe([1, 2, 3], 4) : number[]
|
||||
>concatMaybe : <T>(...args: (T | Maybe<T>[] | undefined)[]) => T[]
|
||||
>[1, 2, 3] : number[]
|
||||
>1 : 1
|
||||
>2 : 2
|
||||
>3 : 3
|
||||
>4 : 4
|
||||
|
||||
Reference in New Issue
Block a user