mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 06:41:59 -06:00
Updated baselines
This commit is contained in:
parent
66ad2e832e
commit
d63b8e1e2b
@ -1,30 +1,33 @@
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,16): error TS1055: Type '{}' is not a valid async function return type.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,16): error TS1055: Type 'any' is not a valid async function return type.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,16): error TS1055: Type 'number' is not a valid async function return type.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,16): error TS1055: Type 'Thenable' is not a valid async function return type.
|
||||
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>.
|
||||
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>.
|
||||
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>.
|
||||
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>.
|
||||
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>.
|
||||
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.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(23,25): error TS1058: Operand for 'await' does not have a valid callable 'then' member.
|
||||
|
||||
|
||||
==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts (6 errors) ====
|
||||
==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts (7 errors) ====
|
||||
declare class Thenable { then(): void; }
|
||||
declare let a: any;
|
||||
declare let obj: { then: string; };
|
||||
declare let thenable: Thenable;
|
||||
async function fn1() { } // valid: Promise<void>
|
||||
async function fn2(): { } { } // error
|
||||
~~~
|
||||
!!! error TS1055: Type '{}' is not a valid async function return type.
|
||||
~~~
|
||||
!!! error TS1064: The return type of an async function or method must be the global Promise<T>.
|
||||
async function fn3(): any { } // error
|
||||
~~~
|
||||
!!! error TS1055: Type 'any' is not a valid async function return type.
|
||||
~~~
|
||||
!!! error TS1064: The return type of an async function or method must be the global Promise<T>.
|
||||
async function fn4(): number { } // error
|
||||
~~~
|
||||
!!! error TS1055: Type 'number' is not a valid async function return type.
|
||||
~~~~~~
|
||||
!!! error TS1064: The return type of an async function or method must be the global Promise<T>.
|
||||
async function fn5(): PromiseLike<void> { } // error
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1064: The return type of an async function or method must be the global Promise<T>.
|
||||
async function fn6(): Thenable { } // error
|
||||
~~~
|
||||
!!! error TS1055: Type 'Thenable' is not a valid async function return type.
|
||||
~~~~~~~~
|
||||
!!! error TS1064: The return type of an async function or method must be the global Promise<T>.
|
||||
async function fn7() { return; } // valid: Promise<void>
|
||||
async function fn8() { return 1; } // valid: Promise<number>
|
||||
async function fn9() { return null; } // valid: Promise<any>
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
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>.
|
||||
|
||||
|
||||
==== tests/cases/conformance/async/es6/task.ts (0 errors) ====
|
||||
export class Task<T> extends Promise<T> { }
|
||||
|
||||
==== tests/cases/conformance/async/es6/test.ts (1 errors) ====
|
||||
import { Task } from "./task";
|
||||
class Test {
|
||||
async example<T>(): Task<T> { return; }
|
||||
~~~~~~~
|
||||
!!! error TS1064: The return type of an async function or method must be the global Promise<T>.
|
||||
}
|
||||
@ -1,12 +1,12 @@
|
||||
//// [tests/cases/conformance/async/es6/asyncImportedPromise_es6.ts] ////
|
||||
|
||||
//// [task.ts]
|
||||
export class Task<T> extends Promise<T> { }
|
||||
export class Task<T> extends Promise<T> { }
|
||||
|
||||
//// [test.ts]
|
||||
import { Task } from "./task";
|
||||
class Test {
|
||||
async example<T>(): Task<T> { return; }
|
||||
import { Task } from "./task";
|
||||
class Test {
|
||||
async example<T>(): Task<T> { return; }
|
||||
}
|
||||
|
||||
//// [task.js]
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
=== tests/cases/conformance/async/es6/task.ts ===
|
||||
export class Task<T> extends Promise<T> { }
|
||||
>Task : Symbol(Task, Decl(task.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(task.ts, 0, 18))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>T : Symbol(T, Decl(task.ts, 0, 18))
|
||||
|
||||
=== tests/cases/conformance/async/es6/test.ts ===
|
||||
import { Task } from "./task";
|
||||
>Task : Symbol(Task, Decl(test.ts, 0, 8))
|
||||
|
||||
class Test {
|
||||
>Test : Symbol(Test, Decl(test.ts, 0, 30))
|
||||
|
||||
async example<T>(): Task<T> { return; }
|
||||
>example : Symbol(example, Decl(test.ts, 1, 12))
|
||||
>T : Symbol(T, Decl(test.ts, 2, 18))
|
||||
>Task : Symbol(Task, Decl(test.ts, 0, 8))
|
||||
>T : Symbol(T, Decl(test.ts, 2, 18))
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
=== tests/cases/conformance/async/es6/task.ts ===
|
||||
export class Task<T> extends Promise<T> { }
|
||||
>Task : Task<T>
|
||||
>T : T
|
||||
>Promise : Promise<T>
|
||||
>T : T
|
||||
|
||||
=== tests/cases/conformance/async/es6/test.ts ===
|
||||
import { Task } from "./task";
|
||||
>Task : typeof Task
|
||||
|
||||
class Test {
|
||||
>Test : Test
|
||||
|
||||
async example<T>(): Task<T> { return; }
|
||||
>example : <T>() => Task<T>
|
||||
>T : T
|
||||
>Task : Task<T>
|
||||
>T : T
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
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>.
|
||||
|
||||
|
||||
==== tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts (1 errors) ====
|
||||
namespace X {
|
||||
export class MyPromise<T> extends Promise<T> {
|
||||
}
|
||||
}
|
||||
|
||||
async function f(): X.MyPromise<void> {
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1064: The return type of an async function or method must be the global Promise<T>.
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
=== tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts ===
|
||||
namespace X {
|
||||
>X : Symbol(X, Decl(asyncQualifiedReturnType_es6.ts, 0, 0))
|
||||
|
||||
export class MyPromise<T> extends Promise<T> {
|
||||
>MyPromise : Symbol(MyPromise, Decl(asyncQualifiedReturnType_es6.ts, 0, 13))
|
||||
>T : Symbol(T, Decl(asyncQualifiedReturnType_es6.ts, 1, 27))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>T : Symbol(T, Decl(asyncQualifiedReturnType_es6.ts, 1, 27))
|
||||
}
|
||||
}
|
||||
|
||||
async function f(): X.MyPromise<void> {
|
||||
>f : Symbol(f, Decl(asyncQualifiedReturnType_es6.ts, 3, 1))
|
||||
>X : Symbol(X, Decl(asyncQualifiedReturnType_es6.ts, 0, 0))
|
||||
>MyPromise : Symbol(X.MyPromise, Decl(asyncQualifiedReturnType_es6.ts, 0, 13))
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
=== tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts ===
|
||||
namespace X {
|
||||
>X : typeof X
|
||||
|
||||
export class MyPromise<T> extends Promise<T> {
|
||||
>MyPromise : MyPromise<T>
|
||||
>T : T
|
||||
>Promise : Promise<T>
|
||||
>T : T
|
||||
}
|
||||
}
|
||||
|
||||
async function f(): X.MyPromise<void> {
|
||||
>f : () => X.MyPromise<void>
|
||||
>X : any
|
||||
>MyPromise : X.MyPromise<T>
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user