Skip to content

Commit c1cf901

Browse files
authored
fix(48291): omit jsdoc modifiers (microsoft#48304)
1 parent 9a2868b commit c1cf901

File tree

5 files changed

+63
-1
lines changed

5 files changed

+63
-1
lines changed

Diff for: src/compiler/checker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -40540,7 +40540,7 @@ namespace ts {
4054040540
return;
4054140541
}
4054240542

40543-
if (!checkGrammarDecoratorsAndModifiers(node) && hasEffectiveModifiers(node)) {
40543+
if (!checkGrammarDecoratorsAndModifiers(node) && hasSyntacticModifiers(node)) {
4054440544
grammarErrorOnFirstToken(node, Diagnostics.An_export_declaration_cannot_have_modifiers);
4054540545
}
4054640546

Diff for: tests/baselines/reference/plainJSGrammarErrors2.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//// [tests/cases/conformance/salsa/plainJSGrammarErrors2.ts] ////
2+
3+
//// [plainJSGrammarErrors2.js]
4+
5+
//// [a.js]
6+
export default 1;
7+
8+
//// [b.js]
9+
/**
10+
* @deprecated
11+
*/
12+
export { default as A } from "./a";
13+
14+
15+
//// [plainJSGrammarErrors2.js]
16+
//// [a.js]
17+
export default 1;
18+
//// [b.js]
19+
/**
20+
* @deprecated
21+
*/
22+
export { default as A } from "./a";
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=== tests/cases/conformance/salsa/plainJSGrammarErrors2.js ===
2+
3+
No type information for this code.=== /a.js ===
4+
export default 1;
5+
No type information for this code.
6+
No type information for this code.=== /b.js ===
7+
/**
8+
* @deprecated
9+
*/
10+
export { default as A } from "./a";
11+
>default : Symbol(default, Decl(a.js, 0, 0))
12+
>A : Symbol(A, Decl(b.js, 3, 8))
13+
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=== tests/cases/conformance/salsa/plainJSGrammarErrors2.js ===
2+
3+
No type information for this code.=== /a.js ===
4+
export default 1;
5+
No type information for this code.
6+
No type information for this code.=== /b.js ===
7+
/**
8+
* @deprecated
9+
*/
10+
export { default as A } from "./a";
11+
>default : 1
12+
>A : 1
13+
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// @outdir: out/
2+
// @target: esnext
3+
// @module: esnext
4+
// @allowJs: true
5+
// @filename: plainJSGrammarErrors2.js
6+
7+
// @filename: /a.js
8+
export default 1;
9+
10+
// @filename: /b.js
11+
/**
12+
* @deprecated
13+
*/
14+
export { default as A } from "./a";

0 commit comments

Comments
 (0)