Merge pull request #7324 from Microsoft/port7310

Port issue 7310
This commit is contained in:
Bill Ticehurst 2016-03-01 11:41:52 -08:00
commit cb5e7f0f61
2 changed files with 3 additions and 2 deletions

View file

@ -411,7 +411,7 @@ namespace ts {
EmitHelperFlags = HasClassExtends | HasDecorators | HasParamDecorators | HasAsyncFunctions,
// Parsing context flags
ContextFlags = DisallowInContext | YieldContext | DecoratorContext | AwaitContext,
ContextFlags = DisallowInContext | YieldContext | DecoratorContext | AwaitContext | JavaScriptFile,
// Exclude these flags when parsing a Type
TypeExcludesFlags = YieldContext | AwaitContext,

View file

@ -11,6 +11,7 @@ module ts {
assert.isTrue(typeAndDiagnostics && typeAndDiagnostics.diagnostics.length === 0);
let result = Utils.sourceFileToJSON(typeAndDiagnostics.jsDocTypeExpression.type);
assert.equal(result, expected);
}
@ -998,7 +999,7 @@ module ts {
? JSON.parse(Utils.sourceFileToJSON(v))
: v;
}, 4);
if (result !== expected) {
// Turn on a human-readable diff
if (typeof require !== 'undefined') {