8000 Accept new baselines · microsoft/TypeScript@986963c · GitHub
[go: up one dir, main page]

Skip to content

Commit 986963c

Browse files
committed
Accept new baselines
1 parent 95c3c56 commit 986963c

6 files changed

+19
-19
lines changed

tests/baselines/reference/intersectionOfUnionNarrowing.types

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@ declare const q: X & AorB;
2020

2121
if (q.a !== undefined) {
2222
>q.a !== undefined : boolean
23-
>q.a : { aProp: string; } | undefined
23+
>q.a : ({ aProp: string; } & object) | undefined
2424
>q : X & AorB
25-
>a : { aProp: string; } | undefined
25+
>a : ({ aProp: string; } & object) | undefined
2626
>undefined : undefined
2727

2828
q.a.aProp;
2929
>q.a.aProp : string
30-
>q.a : { aProp: string; }
30+
>q.a : { aProp: string; } & object
3131
>q : X & { a: object; b: undefined; }
32-
>a : { aProp: string; }
32+
>a : { aProp: string; } & object
3333
>aProp : string
3434

3535
} else {
3636
// q.b is previously incorrectly inferred as potentially undefined
3737
q.b.bProp;
3838
>q.b.bProp : string
39-
>q.b : { bProp: string; }
39+
>q.b : { bProp: string; } & object
4040
>q : X & { a: undefined; b: object; }
41-
>b : { bProp: string; }
41+
>b : { bProp: string; } & object
4242
>bProp : string
4343
}
4444

tests/baselines/reference/nonPrimitiveUnionIntersection.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts(1,5): error TS2322: Type 'string' is not assignable to type 'never'.
22
tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts(3,5): error TS2322: Type 'number' is not assignable to type 'object'.
33
tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts(4,1): error TS2322: Type 'string' is not assignable to type 'never'.
4-
tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts(8,38): error TS2322: Type '{ bar: string; }' is not assignable to type '{ err: string; }'.
5-
Object literal may only specify known properties, and 'bar' does not exist in type '{ err: string; }'.
4+
tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts(8,38): error TS2322: Type '{ bar: string; }' is not assignable to type 'object & { err: string; }'.
5+
Object literal may only specify known properties, and 'bar' does not exist in type 'object & { err: string; }'.
66

77

88
==== tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts (4 errors) ====
@@ -21,6 +21,6 @@ tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts(8,38
2121
const foo: object & {} = {bar: 'bar'}; // ok
2222
const bar: object & {err: string} = {bar: 'bar'}; // error
2323
~~~~~~~~~~
24-
!!! error TS2322: Type '{ bar: string; }' is not assignable to type '{ err: string; }'.
25-
!!! error TS2322: Object literal may only specify known properties, and 'bar' does not exist in type '{ err: string; }'.
24+
!!! error TS2322: Type '{ bar: string; }' is not assignable to type 'object & { err: string; }'.
25+
!!! error TS2322: Object literal may only specify known properties, and 'bar' does not exist in type 'object & { err: string; }'.
2626

tests/baselines/reference/nonPrimitiveUnionIntersection.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const foo: object & {} = {bar: 'bar'}; // ok
2828
>'bar' : "bar"
2929

3030
const bar: object & {err: string} = {bar: 'bar'}; // error
31-
>bar : { err: string; }
31+
>bar : object & { err: string; }
3232
>err : string
3333
>{bar: 'bar'} : { bar: string; }
3434
>bar : string

tests/baselines/reference/objectLiteralExcessProperties.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ tests/cases/compiler/objectLiteralExcessProperties.ts(43,43): error TS2322: Type
2828
Object literal may only specify known properties, and 'name' does not exist in type '{ prop: boolean; }'.
2929
tests/cases/compiler/objectLiteralExcessProperties.ts(45,76): error TS2322: Type '{ name: string; prop: boolean; }' is not assignable to type '(T & { prop: boolean; }) | { name: string; }'.
3030
Object literal may only specify known properties, and 'prop' does not exist in type '{ name: string; }'.
31-
tests/cases/compiler/objectLiteralExcessProperties.ts(49,44): error TS2322: Type '{ z: string; }' is not assignable to type '{ x: string; }'.
32-
Object literal may only specify known properties, and 'z' does not exist in type '{ x: string; }'.
31+
tests/cases/compiler/objectLiteralExcessProperties.ts(49,44): error TS2322: Type '{ z: string; }' is not assignable to type 'object & { x: string; }'.
32+
Object literal may only specify known properties, and 'z' does not exist in type 'object & { x: string; }'.
3333

3434

3535
==== tests/cases/compiler/objectLiteralExcessProperties.ts (16 errors) ====
@@ -129,7 +129,7 @@ tests/cases/compiler/objectLiteralExcessProperties.ts(49,44): error TS2322: Type
129129
// The 'object' type has no effect on intersections
130130
const obj6: object & { x: string } = { z: 'abc' }
131131
~~~~~~~~
132-
!!! error TS2322: Type '{ z: string; }' is not assignable to type '{ x: string; }'.
133-
!!! error TS2322: Object literal may only specify known properties, and 'z' does not exist in type '{ x: string; }'.
132+
!!! error TS2322: Type '{ z: string; }' is not assignable to type 'object & { x: string; }'.
133+
!!! error TS2322: Object literal may only specify known properties, and 'z' does not exist in type 'object & { x: string; }'.
134134
}
135135

tests/baselines/reference/objectLiteralExcessProperties.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ function test<T extends IFoo>() {
151151

152152
// The 'object' type has no effect on intersections
153153
const obj6: object & { x: string } = { z: 'abc' }
154-
>obj6 : { x: string; }
154+
>obj6 : object & { x: string; }
155155
>x : string
156156
>{ z: 'abc' } : { z: string; }
157157
>z : string

tests/baselines/reference/recursiveTypeRelations.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type ClassNameMap<S> = { [K in keyof S]?: boolean }
2424
>ClassNameMap : ClassNameMap<S>
2525

2626
type ClassNameObjectMap<S> = object & ClassNameMap<S>;
27-
>ClassNameObjectMap : ClassNameMap<S>
27+
>ClassNameObjectMap : ClassNameObjectMap<S>
2828

2929
type ClassNameArg<S> = ClassName<S> | ClassNameObjectMap<S>;
3030
>ClassNameArg : ClassNameArg<S>
@@ -75,7 +75,7 @@ export function css<S extends { [K in keyof S]: string }>(styles: S, ...classNam
7575
>Object.keys : (o: object) => string[]
7676
>Object : ObjectConstructor
7777
>keys : (o: object) => string[]
78-
>arg : ClassNameMap<S>
78+
>arg : ClassNameObjectMap<S>
7979
>reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; < 736A U>(callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }
8080
>(obj: ClassNameObject, key: keyof S) => { const exportedClassName = styles[key]; obj[exportedClassName] = (arg as ClassNameMap<S>)[key]; return obj; } : (obj: ClassNameObject, key: keyof S) => ClassNameObject
8181
>obj : ClassNameObject
@@ -95,7 +95,7 @@ export function css<S extends { [K in keyof S]: string }>(styles: S, ...classNam
9595
>(arg as ClassNameMap<S>)[key] : boolean
9696
>(arg as ClassNameMap<S>) : ClassNameMap<S>
9797
>arg as ClassNameMap<S> : ClassNameMap<S>
98-
>arg : ClassNameMap<S>
98+
>arg : ClassNameObjectMap<S>
9999
>key : keyof S
100100

101101
return obj;

0 commit comments

Comments
 (0)
0