fix(48291): omit jsdoc modifiers (#48304)

This commit is contained in:
Oleksandr T 2022-03-17 22:44:42 +02:00 committed by GitHub
parent 9a2868bf98
commit c1cf901997
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 63 additions and 1 deletions

View File

@ -40540,7 +40540,7 @@ namespace ts {
return;
}
if (!checkGrammarDecoratorsAndModifiers(node) && hasEffectiveModifiers(node)) {
if (!checkGrammarDecoratorsAndModifiers(node) && hasSyntacticModifiers(node)) {
grammarErrorOnFirstToken(node, Diagnostics.An_export_declaration_cannot_have_modifiers);
}

View File

@ -0,0 +1,22 @@
//// [tests/cases/conformance/salsa/plainJSGrammarErrors2.ts] ////
//// [plainJSGrammarErrors2.js]
//// [a.js]
export default 1;
//// [b.js]
/**
* @deprecated
*/
export { default as A } from "./a";
//// [plainJSGrammarErrors2.js]
//// [a.js]
export default 1;
//// [b.js]
/**
* @deprecated
*/
export { default as A } from "./a";

View File

@ -0,0 +1,13 @@
=== tests/cases/conformance/salsa/plainJSGrammarErrors2.js ===
No type information for this code.=== /a.js ===
export default 1;
No type information for this code.
No type information for this code.=== /b.js ===
/**
* @deprecated
*/
export { default as A } from "./a";
>default : Symbol(default, Decl(a.js, 0, 0))
>A : Symbol(A, Decl(b.js, 3, 8))

View File

@ -0,0 +1,13 @@
=== tests/cases/conformance/salsa/plainJSGrammarErrors2.js ===
No type information for this code.=== /a.js ===
export default 1;
No type information for this code.
No type information for this code.=== /b.js ===
/**
* @deprecated
*/
export { default as A } from "./a";
>default : 1
>A : 1

View File

@ -0,0 +1,14 @@
// @outdir: out/
// @target: esnext
// @module: esnext
// @allowJs: true
// @filename: plainJSGrammarErrors2.js
// @filename: /a.js
export default 1;
// @filename: /b.js
/**
* @deprecated
*/
export { default as A } from "./a";