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 <jacob@frende.me>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
  • Loading branch information
aduh95 committed Nov 6, 2024
1 parent dd9b683 commit c2fcda4
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 c2fcda4

Please sign in to comment.