Skip to content

Commit cb5e7f0

Browse files
committed
Merge pull request microsoft#7324 from Microsoft/port7310
Port issue 7310
2 parents c531fcb + cbd7336 commit cb5e7f0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/compiler/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ namespace ts {
411411
EmitHelperFlags = HasClassExtends | HasDecorators | HasParamDecorators | HasAsyncFunctions,
412412

413413
// Parsing context flags
414-
ContextFlags = DisallowInContext | YieldContext | DecoratorContext | AwaitContext,
414+
ContextFlags = DisallowInContext | YieldContext | DecoratorContext | AwaitContext | JavaScriptFile,
415415

416416
// Exclude these flags when parsing a Type
417417
TypeExcludesFlags = YieldContext | AwaitContext,

tests/cases/unittests/jsDocParsing.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module ts {
1111
assert.isTrue(typeAndDiagnostics && typeAndDiagnostics.diagnostics.length === 0);
1212

1313
let result = Utils.sourceFileToJSON(typeAndDiagnostics.jsDocTypeExpression.type);
14+
1415
assert.equal(result, expected);
1516
}
1617

@@ -998,7 +999,7 @@ module ts {
998999
? JSON.parse(Utils.sourceFileToJSON(v))
9991000
: v;
10001001
}, 4);
1001-
1002+
10021003
if (result !== expected) {
10031004
// Turn on a human-readable diff
10041005
if (typeof require !== 'undefined') {

0 commit comments

Comments
 (0)