mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
41 lines
644 B
TypeScript
41 lines
644 B
TypeScript
//// [tests/cases/compiler/declarationEmitBundlerConditions.ts] ////
|
|
|
|
//// [package.json]
|
|
{
|
|
"name": "pkg",
|
|
"type": "module",
|
|
"exports": {
|
|
".": {
|
|
"import": "./index.js",
|
|
"require": "./index.cjs"
|
|
}
|
|
}
|
|
}
|
|
|
|
//// [index.d.ts]
|
|
export declare class C {
|
|
private p;
|
|
}
|
|
|
|
//// [index.d.cts]
|
|
export {};
|
|
|
|
//// [makeC.ts]
|
|
import { C } from "pkg";
|
|
export function makeC() {
|
|
return new C();
|
|
}
|
|
|
|
//// [index.ts]
|
|
import { makeC } from "./makeC";
|
|
export const c = makeC();
|
|
|
|
|
|
|
|
|
|
//// [makeC.d.ts]
|
|
import { C } from "pkg";
|
|
export declare function makeC(): C;
|
|
//// [index.d.ts]
|
|
export declare const c: import("pkg").C;
|