Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/main' into noinfer
  • Loading branch information
Andarist committed Jun 13, 2023
commit b5f0ee113d1d96459a86bf17ebd4872ffaad45d1
26 changes: 13 additions & 13 deletions tests/baselines/reference/noInfer.errors.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts(4,12): error TS2345: Argument of type '"bar"' is not assignable to parameter of type '"foo"'.
tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts(12,30): error TS2741: Property 'woof' is missing in type 'Animal' but required in type 'Dog'.
tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts(18,16): error TS2345: Argument of type '{ x: number; }' is not assignable to parameter of type '{ x: number; y: number; }'.
noInfer.ts(4,12): error TS2345: Argument of type '"bar"' is not assignable to parameter of type '"foo"'.
noInfer.ts(12,30): error TS2741: Property 'woof' is missing in type 'Animal' but required in type 'Dog'.
noInfer.ts(18,16): error TS2345: Argument of type '{ x: number; }' is not assignable to parameter of type '{ x: number; y: number; }'.
Property 'y' is missing in type '{ x: number; }' but required in type '{ x: number; y: number; }'.
tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts(23,22): error TS2345: Argument of type '{ x: number; y: number; }' is not assignable to parameter of type '{ x: number; }'.
noInfer.ts(23,22): error TS2345: Argument of type '{ x: number; y: number; }' is not assignable to parameter of type '{ x: number; }'.
Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; }'.
tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts(24,14): error TS2345: Argument of type '{ x: number; y: number; }' is not assignable to parameter of type '{ x: number; }'.
noInfer.ts(24,14): error TS2345: Argument of type '{ x: number; y: number; }' is not assignable to parameter of type '{ x: number; }'.
Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; }'.
tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts(31,14): error TS2345: Argument of type '{}' is not assignable to parameter of type '{ foo: number; }'.
noInfer.ts(31,14): error TS2345: Argument of type '{}' is not assignable to parameter of type '{ foo: number; }'.
Property 'foo' is missing in type '{}' but required in type '{ foo: number; }'.


==== tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts (6 errors) ====
==== noInfer.ts (6 errors) ====
export declare function foo<T extends string>(a: T, b: NoInfer<T>): void

foo('foo', 'foo') // ok
Expand All @@ -27,8 +27,8 @@ tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts(31,14):
doSomething(new Dog(), () => new Animal()); // error
~~~~~~~~~~~~
!!! error TS2741: Property 'woof' is missing in type 'Animal' but required in type 'Dog'.
!!! related TS2728 tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts:7:43: 'woof' is declared here.
!!! related TS6502 tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts:8:62: The expected type comes from the return type of this signature.
!!! related TS2728 noInfer.ts:7:43: 'woof' is declared here.
!!! related TS6502 noInfer.ts:8:62: The expected type comes from the return type of this signature.

export declare function assertEqual<T>(actual: T, expected: NoInfer<T>): boolean;

Expand All @@ -38,17 +38,17 @@ tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts(31,14):
~~~~~~~~
!!! error TS2345: Argument of type '{ x: number; }' is not assignable to parameter of type '{ x: number; y: number; }'.
!!! error TS2345: Property 'y' is missing in type '{ x: number; }' but required in type '{ x: number; y: number; }'.
!!! related TS2728 tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts:17:19: 'y' is declared here.
!!! related TS2728 noInfer.ts:17:19: 'y' is declared here.

export declare function invoke<T, R>(func: (value: T) => R, value: NoInfer<T>): R;
export declare function test(value: { x: number; }): number;

invoke(test, { x: 1, y: 2 }); // error
~~~~
~
!!! error TS2345: Argument of type '{ x: number; y: number; }' is not assignable to parameter of type '{ x: number; }'.
!!! error TS2345: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; }'.
test({ x: 1, y: 2 }); // error
~~~~
~
!!! error TS2345: Argument of type '{ x: number; y: number; }' is not assignable to parameter of type '{ x: number; }'.
!!! error TS2345: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; }'.

Expand All @@ -61,7 +61,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts(31,14):
~~
!!! error TS2345: Argument of type '{}' is not assignable to parameter of type '{ foo: number; }'.
!!! error TS2345: Property 'foo' is missing in type '{}' but required in type '{ foo: number; }'.
!!! related TS2728 tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts:28:40: 'foo' is declared here.
!!! related TS2728 noInfer.ts:28:40: 'foo' is declared here.

export declare function mutate<T>(callback: (a: NoInfer<T>, b: number) => T): T;
export const mutate1 = mutate((a, b) => b);
Expand Down
2 changes: 2 additions & 0 deletions tests/baselines/reference/noInfer.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//// [tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts] ////

//// [noInfer.ts]
export declare function foo<T extends string>(a: T, b: NoInfer<T>): void

Expand Down
4 changes: 3 additions & 1 deletion tests/baselines/reference/noInfer.symbols
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
=== tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts ===
//// [tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts] ////

=== noInfer.ts ===
export declare function foo<T extends string>(a: T, b: NoInfer<T>): void
>foo : Symbol(foo, Decl(noInfer.ts, 0, 0))
>T : Symbol(T, Decl(noInfer.ts, 0, 28))
Expand Down
4 changes: 3 additions & 1 deletion tests/baselines/reference/noInfer.types
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
=== tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts ===
//// [tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts] ////

=== noInfer.ts ===
export declare function foo<T extends string>(a: T, b: NoInfer<T>): void
>foo : <T extends string>(a: T, b: NoInfer<T>) => void
>a : T
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.