mirror of
https://github.com/nodejs/node.git
synced 2025-12-27 23:41:14 +00:00
typings: fix ModulesBinding types
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
7b01758ded
commit
df4a0c996d
9
typings/internalBinding/modules.d.ts
vendored
9
typings/internalBinding/modules.d.ts
vendored
@ -9,7 +9,7 @@ export type PackageConfig = {
|
||||
export type DeserializedPackageConfig = {
|
||||
data: PackageConfig,
|
||||
exists: boolean,
|
||||
path: URL['pathname'],
|
||||
path: string,
|
||||
}
|
||||
export type SerializedPackageConfig = [
|
||||
PackageConfig['name'],
|
||||
@ -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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user