Skip to content

Commit 9b149a6

Browse files
committed
Changes prompted by apiextractor
1 parent b7f7f04 commit 9b149a6

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/esm.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ export namespace NodeLoaderHooksAPI2 {
8080
format: NodeLoaderHooksFormat;
8181
source: string | Buffer | undefined;
8282
}>;
83+
export type NodeImportConditions = unknown;
84+
export interface NodeImportAssertions {
85+
type?: 'json';
86+
}
8387
}
8488

8589
export type NodeLoaderHooksFormat =
@@ -90,11 +94,6 @@ export type NodeLoaderHooksFormat =
9094
| 'module'
9195
| 'wasm';
9296

93-
export type NodeImportConditions = unknown;
94-
export interface NodeImportAssertions {
95-
type?: 'json';
96-
}
97-
9897
/** @internal */
9998
export function registerAndCreateEsmHooks(opts?: RegisterOptions) {
10099
// Automatically performs registration just like `-r ts-node/register`
@@ -173,7 +172,7 @@ export function createEsmHooks(tsNodeService: Service) {
173172
url: string,
174173
context: {
175174
format: NodeLoaderHooksFormat | null | undefined;
176-
importAssertions?: NodeImportAssertions;
175+
importAssertions?: NodeLoaderHooksAPI2.NodeImportAssertions;
177176
},
178177
defaultLoad: typeof load
179178
): Promise<{

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ export interface CreateOptions {
371371
tsTrace?: (str: string) => void;
372372
}
373373

374-
type ModuleTypes = Record<string, 'cjs' | 'esm' | 'package'>;
374+
export type ModuleTypes = Record<string, 'cjs' | 'esm' | 'package'>;
375375

376376
/** @internal */
377377
export interface OptionBasePaths {

0 commit comments

Comments
 (0)