Skip to content

Commit

Permalink
Changes prompted by apiextractor
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode committed Feb 7, 2022
1 parent b7f7f04 commit 9b149a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions src/esm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ export namespace NodeLoaderHooksAPI2 {
format: NodeLoaderHooksFormat;
source: string | Buffer | undefined;
}>;
export type NodeImportConditions = unknown;
export interface NodeImportAssertions {
type?: 'json';
}
}

export type NodeLoaderHooksFormat =
Expand All @@ -90,11 +94,6 @@ export type NodeLoaderHooksFormat =
| 'module'
| 'wasm';

export type NodeImportConditions = unknown;
export interface NodeImportAssertions {
type?: 'json';
}

/** @internal */
export function registerAndCreateEsmHooks(opts?: RegisterOptions) {
// Automatically performs registration just like `-r ts-node/register`
Expand Down Expand Up @@ -173,7 +172,7 @@ export function createEsmHooks(tsNodeService: Service) {
url: string,
context: {
format: NodeLoaderHooksFormat | null | undefined;
importAssertions?: NodeImportAssertions;
importAssertions?: NodeLoaderHooksAPI2.NodeImportAssertions;
},
defaultLoad: typeof load
): Promise<{
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ export interface CreateOptions {
tsTrace?: (str: string) => void;
}

type ModuleTypes = Record<string, 'cjs' | 'esm' | 'package'>;
export type ModuleTypes = Record<string, 'cjs' | 'esm' | 'package'>;

/** @internal */
export interface OptionBasePaths {
Expand Down

0 comments on commit 9b149a6

Please sign in to comment.