Skip to content

Commit d63b8e1

Browse files
committed
Updated baselines
1 parent 66ad2e8 commit d63b8e1

8 files changed

+46
-91
lines changed

tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
1-
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,16): error TS1055: Type '{}' is not a valid async function return type.
2-
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,16): error TS1055: Type 'any' is not a valid async function return type.
3-
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,16): error TS1055: Type 'number' is not a valid async function return type.
4-
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,16): error TS1055: Type 'Thenable' is not a valid async function return type.
1+
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,23): error TS1064: The return type of an async function or method must be the global Promise<T>.
2+
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,23): error TS1064: The return type of an async function or method must be the global Promise<T>.
3+
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,23): error TS1064: The return type of an async function or method must be the global Promise<T>.
4+
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(9,23): error TS1064: The return type of an async function or method must be the global Promise<T>.
5+
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,23): error TS1064: The return type of an async function or method must be the global Promise<T>.
56
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(17,16): error TS1059: Return expression in async function does not have a valid callable 'then' member.
67
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(23,25): error TS1058: Operand for 'await' does not have a valid callable 'then' member.
78

89

9-
==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts (6 errors) ====
10+
==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts (7 errors) ====
1011
declare class Thenable { then(): void; }
1112
declare let a: any;
1213
declare let obj: { then: string; };
1314
declare let thenable: Thenable;
1415
async function fn1() { } // valid: Promise<void>
1516
async function fn2(): { } { } // error
16-
~~~
17-
!!! error TS1055: Type '{}' is not a valid async function return type.
17+
~~~
18+
!!! error TS1064: The return type of an async function or method must be the global Promise<T>.
1819
async function fn3(): any { } // error
19-
~~~
20-
!!! error TS1055: Type 'any' is not a valid async function return type.
20+
~~~
21+
!!! error TS1064: The return type of an async function or method must be the global Promise<T>.
2122
async function fn4(): number { } // error
22-
~~~
23-
!!! error TS1055: Type 'number' is not a valid async function return type.
23+
~~~~~~
24+
!!! error TS1064: The return type of an async function or method must be the global Promise<T>.
2425
async function fn5(): PromiseLike<void> { } // error
26+
~~~~~~~~~~~~~~~~~
27+
!!! error TS1064: The return type of an async function or method must be the global Promise<T>.
2528
async function fn6(): Thenable { } // error
26-
~~~
27-
!!! error TS1055: Type 'Thenable' is not a valid async function return type.
29+
~~~~~~~~
30+
!!! error TS1064: The return type of an async function or method must be the global Promise<T>.
2831
async function fn7() { return; } // valid: Promise<void>
2932
async function fn8() { return 1; } // valid: Promise<number>
3033
async function fn9() { return null; } // valid: Promise<any>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
tests/cases/conformance/async/es6/test.ts(3,25): error TS1064: The return type of an async function or method must be the global Promise<T>.
2+
3+
4+
==== tests/cases/conformance/async/es6/task.ts (0 errors) ====
5+
export class Task<T> extends Promise<T> { }
6+
7+
==== tests/cases/conformance/async/es6/test.ts (1 errors) ====
8+
import { Task } from "./task";
9+
class Test {
10+
async example<T>(): Task<T> { return; }
11+
~~~~~~~
12+
!!! error TS1064: The return type of an async function or method must be the global Promise<T>.
13+
}

tests/baselines/reference/asyncImportedPromise_es6.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//// [tests/cases/conformance/async/es6/asyncImportedPromise_es6.ts] ////
22

33
//// [task.ts]
4-
export class Task<T> extends Promise<T> { }
4+
export class Task<T> extends Promise<T> { }
55

66
//// [test.ts]
7-
import { Task } from "./task";
8-
class Test {
9-
async example<T>(): Task<T> { return; }
7+
import { Task } from "./task";
8+
class Test {
9+
async example<T>(): Task<T> { return; }
1010
}
1111

1212
//// [task.js]

tests/baselines/reference/asyncImportedPromise_es6.symbols

Lines changed: 0 additions & 20 deletions
This file was deleted.

tests/baselines/reference/asyncImportedPromise_es6.types

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts(6,21): error TS1064: The return type of an async function or method must be the global Promise<T>.
2+
3+
4+
==== tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts (1 errors) ====
5+
namespace X {
6+
export class MyPromise<T> extends Promise<T> {
7+
}
8+
}
9+
10+
async function f(): X.MyPromise<void> {
11+
~~~~~~~~~~~~~~~~~
12+
!!! error TS1064: The return type of an async function or method must be the global Promise<T>.
13+
}

tests/baselines/reference/asyncQualifiedReturnType_es6.symbols

Lines changed: 0 additions & 17 deletions
This file was deleted.

tests/baselines/reference/asyncQualifiedReturnType_es6.types

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)