Skip to content

Commit

Permalink
refactor(types): improve CJS module types
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Jun 30, 2024
1 parent 23ebe7e commit 8c61236
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/@types/module.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,19 @@ declare module 'module' {
* which doesn't have a file path.
*/
filename: string | null;
path: string;
paths: string[];
};

export function _resolveFilename(
request: string,
parent: Parent | undefined,
isMain: boolean,
isMain?: boolean,
options?: Record<PropertyKey, unknown>,
): string;

export function _nodeModulePaths(path: string): string[];

interface LoadFnOutput {
// Added in https://github.com/nodejs/node/pull/43164
responseURL?: string;
Expand Down

0 comments on commit 8c61236

Please sign in to comment.