mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-14 19:16:17 -06:00
Update baselines with new spread type index errors
This commit is contained in:
parent
66d4798145
commit
24300932cf
@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/types/spread/objectSpreadIndexSignature.ts(6,39): error TS2698: Type literals with spreads cannot contain an index signature.
|
||||
tests/cases/conformance/types/spread/objectSpreadIndexSignature.ts(24,20): error TS2698: Type literals with spreads cannot contain an index signature.
|
||||
tests/cases/conformance/types/spread/objectSpreadIndexSignature.ts(6,39): error TS2698: Type literals with spreads cannot contain index, call or construct signatures.
|
||||
tests/cases/conformance/types/spread/objectSpreadIndexSignature.ts(24,20): error TS2698: Type literals with spreads cannot contain index, call or construct signatures.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/spread/objectSpreadIndexSignature.ts (2 errors) ====
|
||||
@ -10,7 +10,7 @@ tests/cases/conformance/types/spread/objectSpreadIndexSignature.ts(24,20): error
|
||||
// index signatures are not allowed in object literals with spread types
|
||||
let c: { ...C, b: string, c?: string, [n: number]: string };
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2698: Type literals with spreads cannot contain an index signature.
|
||||
!!! error TS2698: Type literals with spreads cannot contain index, call or construct signatures.
|
||||
let n: number = c.a;
|
||||
let s: string = c[12];
|
||||
interface Indexed {
|
||||
@ -30,6 +30,6 @@ tests/cases/conformance/types/spread/objectSpreadIndexSignature.ts(24,20): error
|
||||
function f<T>(t: T) {
|
||||
let i: { ...T, [n: number]: string };
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2698: Type literals with spreads cannot contain an index signature.
|
||||
!!! error TS2698: Type literals with spreads cannot contain index, call or construct signatures.
|
||||
}
|
||||
|
||||
@ -16,13 +16,15 @@ tests/cases/conformance/types/spread/objectSpreadNegative.ts(41,11): error TS233
|
||||
tests/cases/conformance/types/spread/objectSpreadNegative.ts(45,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
|
||||
tests/cases/conformance/types/spread/objectSpreadNegative.ts(49,12): error TS2339: Property 'b' does not exist on type '{}'.
|
||||
tests/cases/conformance/types/spread/objectSpreadNegative.ts(55,9): error TS2339: Property 'm' does not exist on type '{ p: number; }'.
|
||||
tests/cases/conformance/types/spread/objectSpreadNegative.ts(57,48): error TS2698: Type literals with spreads cannot contain index, call or construct signatures.
|
||||
tests/cases/conformance/types/spread/objectSpreadNegative.ts(57,69): error TS2698: Type literals with spreads cannot contain index, call or construct signatures.
|
||||
tests/cases/conformance/types/spread/objectSpreadNegative.ts(58,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{ x: number; }' has no compatible call signatures.
|
||||
tests/cases/conformance/types/spread/objectSpreadNegative.ts(59,1): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
tests/cases/conformance/types/spread/objectSpreadNegative.ts(64,9): error TS2322: Type '{ ...T & V }' is not assignable to type '{ ...T & U }'.
|
||||
tests/cases/conformance/types/spread/objectSpreadNegative.ts(66,12): error TS2322: Type '{ ...U }' is not assignable to type 'U'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/spread/objectSpreadNegative.ts (19 errors) ====
|
||||
==== tests/cases/conformance/types/spread/objectSpreadNegative.ts (21 errors) ====
|
||||
let o = { a: 1, b: 'no' }
|
||||
|
||||
/// private propagates
|
||||
@ -113,6 +115,10 @@ tests/cases/conformance/types/spread/objectSpreadNegative.ts(66,12): error TS232
|
||||
!!! error TS2339: Property 'm' does not exist on type '{ p: number; }'.
|
||||
|
||||
let callableConstructableSpread: { ...PublicX, (n: number): number, new (p: number) };
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2698: Type literals with spreads cannot contain index, call or construct signatures.
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2698: Type literals with spreads cannot contain index, call or construct signatures.
|
||||
callableConstructableSpread(12); // error, no call signature
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{ x: number; }' has no compatible call signatures.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user