mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
fix(48291): omit jsdoc modifiers (#48304)
This commit is contained in:
parent
9a2868bf98
commit
c1cf901997
@ -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);
|
||||
}
|
||||
|
||||
|
||||
22
tests/baselines/reference/plainJSGrammarErrors2.js
Normal file
22
tests/baselines/reference/plainJSGrammarErrors2.js
Normal 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";
|
||||
13
tests/baselines/reference/plainJSGrammarErrors2.symbols
Normal file
13
tests/baselines/reference/plainJSGrammarErrors2.symbols
Normal 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))
|
||||
|
||||
13
tests/baselines/reference/plainJSGrammarErrors2.types
Normal file
13
tests/baselines/reference/plainJSGrammarErrors2.types
Normal 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
|
||||
|
||||
14
tests/cases/conformance/salsa/plainJSGrammarErrors2.ts
Normal file
14
tests/cases/conformance/salsa/plainJSGrammarErrors2.ts
Normal 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";
|
||||
Loading…
x
Reference in New Issue
Block a user