mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Add test of toplevel return in JS script
This commit is contained in:
@@ -1,22 +1,8 @@
|
||||
//// [tests/cases/conformance/salsa/plainJSGrammarErrors2.ts] ////
|
||||
|
||||
//// [plainJSGrammarErrors2.js]
|
||||
|
||||
//// [a.js]
|
||||
export default 1;
|
||||
|
||||
//// [b.js]
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
export { default as A } from "./a";
|
||||
// top-level return allowed in JS script files
|
||||
return
|
||||
|
||||
|
||||
//// [plainJSGrammarErrors2.js]
|
||||
//// [a.js]
|
||||
export default 1;
|
||||
//// [b.js]
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
export { default as A } from "./a";
|
||||
// top-level return allowed in JS script files
|
||||
return;
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
=== tests/cases/conformance/salsa/plainJSGrammarErrors2.js ===
|
||||
|
||||
No type information for this code.=== /a.js ===
|
||||
export default 1;
|
||||
// top-level return allowed in JS script files
|
||||
No type information for this code.return
|
||||
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))
|
||||
|
||||
No type information for this code.
|
||||
@@ -1,13 +1,5 @@
|
||||
=== tests/cases/conformance/salsa/plainJSGrammarErrors2.js ===
|
||||
|
||||
No type information for this code.=== /a.js ===
|
||||
export default 1;
|
||||
// top-level return allowed in JS script files
|
||||
No type information for this code.return
|
||||
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
|
||||
|
||||
No type information for this code.
|
||||
@@ -4,11 +4,5 @@
|
||||
// @allowJs: true
|
||||
// @filename: plainJSGrammarErrors2.js
|
||||
|
||||
// @filename: /a.js
|
||||
export default 1;
|
||||
|
||||
// @filename: /b.js
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
export { default as A } from "./a";
|
||||
// top-level return allowed in JS script files
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user