mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
26
tests/baselines/reference/asyncMultiFile.js
Normal file
26
tests/baselines/reference/asyncMultiFile.js
Normal file
@@ -0,0 +1,26 @@
|
||||
//// [tests/cases/conformance/async/es6/asyncMultiFile.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
async function f() {}
|
||||
//// [b.ts]
|
||||
function g() { }
|
||||
|
||||
//// [a.js]
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
generator = generator.call(thisArg, _arguments);
|
||||
function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); }
|
||||
function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } }
|
||||
function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } }
|
||||
function step(verb, value) {
|
||||
var result = generator[verb](value);
|
||||
result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject);
|
||||
}
|
||||
step("next", void 0);
|
||||
});
|
||||
};
|
||||
function f() {
|
||||
return __awaiter(this, void 0, Promise, function* () { });
|
||||
}
|
||||
//// [b.js]
|
||||
function g() { }
|
||||
8
tests/baselines/reference/asyncMultiFile.symbols
Normal file
8
tests/baselines/reference/asyncMultiFile.symbols
Normal file
@@ -0,0 +1,8 @@
|
||||
=== tests/cases/conformance/async/es6/a.ts ===
|
||||
async function f() {}
|
||||
>f : Symbol(f, Decl(a.ts, 0, 0))
|
||||
|
||||
=== tests/cases/conformance/async/es6/b.ts ===
|
||||
function g() { }
|
||||
>g : Symbol(g, Decl(b.ts, 0, 0))
|
||||
|
||||
8
tests/baselines/reference/asyncMultiFile.types
Normal file
8
tests/baselines/reference/asyncMultiFile.types
Normal file
@@ -0,0 +1,8 @@
|
||||
=== tests/cases/conformance/async/es6/a.ts ===
|
||||
async function f() {}
|
||||
>f : () => Promise<void>
|
||||
|
||||
=== tests/cases/conformance/async/es6/b.ts ===
|
||||
function g() { }
|
||||
>g : () => void
|
||||
|
||||
5
tests/cases/conformance/async/es6/asyncMultiFile.ts
Normal file
5
tests/cases/conformance/async/es6/asyncMultiFile.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
// @target: es6
|
||||
// @filename: a.ts
|
||||
async function f() {}
|
||||
// @filename: b.ts
|
||||
function g() { }
|
||||
Reference in New Issue
Block a user