mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 14:43:33 +03:00
b887b30092
**Description:** This is required for https://github.com/swc-project/swc/pull/6981 and https://github.com/swc-project/swc/pull/6950
32 lines
652 B
TypeScript
32 lines
652 B
TypeScript
// @verbatimModuleSyntax: true
|
|
// @target: esnext
|
|
// @module: esnext
|
|
// @moduleResolution: node
|
|
// @esModuleInterop: true, false
|
|
|
|
// @Filename: /decl.d.ts
|
|
declare class CJSy {}
|
|
export = CJSy;
|
|
|
|
// @Filename: /ambient.d.ts
|
|
declare module "ambient" {
|
|
const _export: number;
|
|
export = _export;
|
|
}
|
|
|
|
// @Filename: /types.ts
|
|
interface Typey {}
|
|
export type { Typey };
|
|
|
|
// @Filename: /main.ts
|
|
import CJSy = require("./decl"); // error
|
|
import type CJSy2 = require("./decl"); // ok I guess?
|
|
import CJSy3 from "./decl"; // ok in esModuleInterop
|
|
import * as types from "./types"; // ok
|
|
CJSy;
|
|
|
|
// @Filename: /ns.ts
|
|
export namespace ns {
|
|
export enum A {}
|
|
}
|