mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
63 lines
1.0 KiB
TypeScript
63 lines
1.0 KiB
TypeScript
//// [tests/cases/conformance/node/allowJs/nodeModulesAllowJsExportAssignment.ts] ////
|
|
|
|
//// [index.js]
|
|
// cjs format file
|
|
const a = {};
|
|
export = a;
|
|
//// [file.js]
|
|
// cjs format file
|
|
const a = {};
|
|
module.exports = a;
|
|
//// [index.js]
|
|
// esm format file
|
|
const a = {};
|
|
export = a;
|
|
//// [file.js]
|
|
// esm format file
|
|
import "fs";
|
|
const a = {};
|
|
module.exports = a;
|
|
//// [package.json]
|
|
{
|
|
"name": "package",
|
|
"private": true,
|
|
"type": "module"
|
|
}
|
|
//// [package.json]
|
|
{
|
|
"type": "commonjs"
|
|
}
|
|
|
|
//// [index.js]
|
|
"use strict";
|
|
// cjs format file
|
|
const a = {};
|
|
module.exports = a;
|
|
//// [file.js]
|
|
"use strict";
|
|
// cjs format file
|
|
const a = {};
|
|
module.exports = a;
|
|
//// [index.js]
|
|
// esm format file
|
|
const a = {};
|
|
export {};
|
|
//// [file.js]
|
|
// esm format file
|
|
import "fs";
|
|
const a = {};
|
|
module.exports = a;
|
|
|
|
|
|
//// [index.d.ts]
|
|
declare const a: {};
|
|
export = a;
|
|
//// [file.d.ts]
|
|
export = a;
|
|
declare const a: {};
|
|
//// [index.d.ts]
|
|
declare const a: {};
|
|
export = a;
|
|
//// [file.d.ts]
|
|
import "fs";
|