mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 11:35:42 -06:00
Accept new baselines
This commit is contained in:
parent
60e7528ee6
commit
dbea08f9c8
@ -25,7 +25,7 @@ tests/cases/compiler/objectLiteralExcessProperties.ts(37,25): error TS2304: Cann
|
||||
tests/cases/compiler/objectLiteralExcessProperties.ts(39,11): error TS2322: Type '{ name: string; }' is not assignable to type 'T'.
|
||||
tests/cases/compiler/objectLiteralExcessProperties.ts(41,11): error TS2322: Type '{ name: string; prop: boolean; }' is not assignable to type 'T & { prop: boolean; }'.
|
||||
Type '{ name: string; prop: boolean; }' is not assignable to type 'T'.
|
||||
tests/cases/compiler/objectLiteralExcessProperties.ts(43,43): error TS2322: Type '{ name: string; prop: boolean; }' is not assignable to type 'T | { prop: boolean; }'.
|
||||
tests/cases/compiler/objectLiteralExcessProperties.ts(43,43): error TS2322: Type '{ name: string; prop: true; }' is not assignable to type 'T | { prop: boolean; }'.
|
||||
Object literal may only specify known properties, and 'name' does not exist in type '{ prop: boolean; }'.
|
||||
tests/cases/compiler/objectLiteralExcessProperties.ts(45,76): error TS2322: Type '{ name: string; prop: boolean; }' is not assignable to type '{ name: string; } | (T & { prop: boolean; })'.
|
||||
Object literal may only specify known properties, and 'prop' does not exist in type '{ name: string; }'.
|
||||
@ -119,7 +119,7 @@ tests/cases/compiler/objectLiteralExcessProperties.ts(49,44): error TS2322: Type
|
||||
// Excess property checks only on non-generic parts of unions
|
||||
const obj3: T | { prop: boolean } = { name: "test", prop: true };
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ name: string; prop: boolean; }' is not assignable to type 'T | { prop: boolean; }'.
|
||||
!!! error TS2322: Type '{ name: string; prop: true; }' is not assignable to type 'T | { prop: boolean; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ prop: boolean; }'.
|
||||
// Excess property checks only on non-generic parts of unions
|
||||
const obj4: T & { prop: boolean } | { name: string } = { name: "test", prop: true };
|
||||
|
||||
@ -124,10 +124,10 @@ function test<T extends IFoo>() {
|
||||
const obj3: T | { prop: boolean } = { name: "test", prop: true };
|
||||
>obj3 : T | { prop: boolean; }
|
||||
>prop : boolean
|
||||
>{ name: "test", prop: true } : { name: string; prop: boolean; }
|
||||
>{ name: "test", prop: true } : { name: string; prop: true; }
|
||||
>name : string
|
||||
>"test" : "test"
|
||||
>prop : boolean
|
||||
>prop : true
|
||||
>true : true
|
||||
|
||||
// Excess property checks only on non-generic parts of unions
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user