Merge pull request #10875 from Microsoft/fix10857
Fix missing asteriskToken for target=es6/module=amd.
This commit is contained in:
commit
f16edf95f9
5 changed files with 32 additions and 1 deletions
|
@ -705,7 +705,7 @@ namespace ts {
|
|||
createFunctionDeclaration(
|
||||
/*decorators*/ undefined,
|
||||
/*modifiers*/ undefined,
|
||||
/*asteriskToken*/ undefined,
|
||||
node.asteriskToken,
|
||||
name,
|
||||
/*typeParameters*/ undefined,
|
||||
node.parameters,
|
||||
|
|
13
tests/baselines/reference/generatorES6InAMDModule.js
Normal file
13
tests/baselines/reference/generatorES6InAMDModule.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
//// [generatorES6InAMDModule.ts]
|
||||
export function* foo() {
|
||||
yield
|
||||
}
|
||||
|
||||
//// [generatorES6InAMDModule.js]
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
"use strict";
|
||||
function* foo() {
|
||||
yield;
|
||||
}
|
||||
exports.foo = foo;
|
||||
});
|
|
@ -0,0 +1,6 @@
|
|||
=== tests/cases/compiler/generatorES6InAMDModule.ts ===
|
||||
export function* foo() {
|
||||
>foo : Symbol(foo, Decl(generatorES6InAMDModule.ts, 0, 0))
|
||||
|
||||
yield
|
||||
}
|
7
tests/baselines/reference/generatorES6InAMDModule.types
Normal file
7
tests/baselines/reference/generatorES6InAMDModule.types
Normal file
|
@ -0,0 +1,7 @@
|
|||
=== tests/cases/compiler/generatorES6InAMDModule.ts ===
|
||||
export function* foo() {
|
||||
>foo : () => IterableIterator<any>
|
||||
|
||||
yield
|
||||
>yield : any
|
||||
}
|
5
tests/cases/compiler/generatorES6InAMDModule.ts
Normal file
5
tests/cases/compiler/generatorES6InAMDModule.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
// @target: es6
|
||||
// @module: amd
|
||||
export function* foo() {
|
||||
yield
|
||||
}
|
Loading…
Reference in a new issue