Skip to content

Commit

Permalink
typings: fix ModulesBinding types
Browse files Browse the repository at this point in the history
PR-URL: #55549
Refs: https://github.com/nodejs/node/pull/55412/files#r1817708918
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
  • Loading branch information
aduh95 authored Nov 2, 2024
1 parent 7b01758 commit df4a0c9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions typings/internalBinding/modules.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type PackageConfig = {
export type DeserializedPackageConfig = {
data: PackageConfig,
exists: boolean,
path: URL['pathname'],
path: string,
}
export type SerializedPackageConfig = [
PackageConfig['name'],
Expand All @@ -22,9 +22,10 @@ export type SerializedPackageConfig = [

export interface ModulesBinding {
readPackageJSON(path: string): SerializedPackageConfig | undefined;
getNearestParentPackageJSON(path: string): SerializedPackageConfig | undefined
getNearestRawParentPackageJSON(origin: URL['pathname']): [ReturnType<JSON['stringify']>, DeserializedPackageConfig['path']] | undefined
getNearestParentPackageJSONType(path: string): PackageConfig['type']
getNearestParentPackageJSON(path: string): SerializedPackageConfig | undefined
getPackageScopeConfig(path: string): SerializedPackageConfig | undefined
getPackageJSONScripts(): string | undefined
enableCompileCache(path?: string): { status: number, message?: string, directory?: string }
getCompileCacheDir(): string | undefined
flushCompileCache(keepDeserializedCache?: boolean): void
}

0 comments on commit df4a0c9

Please sign in to comment.