UNPKG

1.79 kBTypeScriptView Raw
1/**
2 * The main tap export, CJS style
3 *
4 * The only different between this and the ESM export is that, because a
5 * CJS default export cannot co-exist with exported types, we have to make
6 * the types available as a global namespace. Which, isn't exactly the most
7 * elegant thing in the world, since it can conflict with any other module
8 * that defines a `tap` global namespace, but at least it's common enough
9 * that it doesn't read as too strange or unintuitive.
10 *
11 * @module
12 */
13import * as items from './main.js';
14import { TAP } from './main.js';
15declare global {
16 /**
17 * All exported types from the `@tapjs/core` module are exported
18 * here into the global `tap` namespace.
19 */
20 namespace tap {
21 type Base = items.Base;
22 type BaseOpts = items.BaseOpts;
23 type Counts = items.Counts;
24 type Extra = items.Extra;
25 type Lists = items.Lists;
26 type Minimal = items.Minimal;
27 type Spawn = items.Spawn;
28 type SpawnEvents = items.SpawnEvents;
29 type SpawnOpts = items.SpawnOpts;
30 type Stdin = items.Stdin;
31 type StdinOpts = items.StdinOpts;
32 type TapFile = items.TapFile;
33 type TapFileEvents = items.TapFileEvents;
34 type TapFileOpts = items.TapFileOpts;
35 type TapBaseEvents = items.TapBaseEvents;
36 type TestBase = items.TestBase;
37 type TestBaseEvents = items.TestBaseEvents;
38 type TestBaseOpts = items.TestBaseOpts;
39 type Worker = items.Worker;
40 type WorkerEvents = items.WorkerEvents;
41 type WorkerOpts = items.WorkerOpts;
42 type TapPlugin<T extends Object, O extends unknown = unknown> = items.TapPlugin<T, O>;
43 }
44}
45declare const _default: TAP & typeof items;
46export = _default;
47//# sourceMappingURL=index-cjs.d.cts.map
\No newline at end of file