Skip to content

Commit 5a39a24

Browse files
committed
typings: fix ModulesBinding types
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]>
1 parent fd37891 commit 5a39a24

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

typings/internalBinding/modules.d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export type PackageConfig = {
99
export type DeserializedPackageConfig = {
1010
data: PackageConfig,
1111
exists: boolean,
12-
path: URL['pathname'],
12+
path: string,
1313
}
1414
export type SerializedPackageConfig = [
1515
PackageConfig['name'],
@@ -22,9 +22,8 @@ export type SerializedPackageConfig = [
2222

2323
export interface ModulesBinding {
2424
readPackageJSON(path: string): SerializedPackageConfig | undefined;
25-
getNearestParentPackageJSON(path: string): SerializedPackageConfig | undefined
26-
getNearestRawParentPackageJSON(origin: URL['pathname']): [ReturnType<JSON['stringify']>, DeserializedPackageConfig['path']] | undefined
2725
getNearestParentPackageJSONType(path: string): PackageConfig['type']
26+
getNearestParentPackageJSON(path: string): SerializedPackageConfig | undefined
2827
getPackageScopeConfig(path: string): SerializedPackageConfig | undefined
2928
getPackageType(path: string): PackageConfig['type'] | undefined
3029
enableCompileCache(path?: string): { status: number, message?: string, directory?: string }

0 commit comments

Comments
 (0)