mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-15 14:05:47 -05:00
dprint the codebase (#54820)
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import { createRequire } from "module";
|
||||
import { __importDefault, __importStar } from "tslib";
|
||||
import {
|
||||
createRequire,
|
||||
} from "module";
|
||||
import {
|
||||
__importDefault,
|
||||
__importStar,
|
||||
} from "tslib";
|
||||
|
||||
// This script tests that TypeScript's CJS API is structured
|
||||
// as expected. It calls "require" as though it were in CWD,
|
||||
@@ -13,12 +18,12 @@ const ts = require(process.argv[2]);
|
||||
// See: https://github.com/microsoft/TypeScript/pull/51474#issuecomment-1310871623
|
||||
/** @type {[fn: (() => any), shouldSucceed: boolean][]} */
|
||||
const fns = [
|
||||
[() => ts.version, true],
|
||||
[() => ts.default.version, false],
|
||||
[() => __importDefault(ts).version, false],
|
||||
[() => ts.version, true],
|
||||
[() => ts.default.version, false],
|
||||
[() => __importDefault(ts).version, false],
|
||||
[() => __importDefault(ts).default.version, true],
|
||||
[() => __importStar(ts).version, true],
|
||||
[() => __importStar(ts).default.version, true],
|
||||
[() => __importStar(ts).version, true],
|
||||
[() => __importStar(ts).default.version, true],
|
||||
];
|
||||
|
||||
for (const [fn, shouldSucceed] of fns) {
|
||||
|
||||
Reference in New Issue
Block a user