Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 63ab003

Browse filesBrowse files
MesteeryBethGriggs
authored andcommitted
typings: separate internalBinding typings
PR-URL: #40409 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Qingyu Deng <i@ayase-lab.com>
1 parent 774bc46 commit 63ab003
Copy full SHA for 63ab003

File tree

Expand file treeCollapse file tree

6 files changed

+47
-43
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

6 files changed

+47
-43
lines changed
Open diff view settings
Collapse file

‎tsconfig.json‎

Copy file name to clipboardExpand all lines: tsconfig.json
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@
22
"include": ["lib","doc"],
33
"exclude": ["src","tools","out"],
44
"files": [
5+
"./typings/internalBinding/config.d.ts",
6+
"./typings/internalBinding/constants.d.ts",
57
"./typings/internalBinding/fs.d.ts",
68
"./typings/internalBinding/http_parser.d.ts",
79
"./typings/internalBinding/messaging.d.ts",
810
"./typings/internalBinding/options.d.ts",
911
"./typings/internalBinding/os.d.ts",
1012
"./typings/internalBinding/serdes.d.ts",
13+
"./typings/internalBinding/symbols.d.ts",
1114
"./typings/internalBinding/timers.d.ts",
15+
"./typings/internalBinding/types.d.ts",
1216
"./typings/internalBinding/util.d.ts",
1317
"./typings/internalBinding/worker.d.ts",
14-
"./typings/internalBinding.d.ts",
18+
"./typings/globals.d.ts",
1519
"./typings/primordials.d.ts"
1620
],
1721
"compilerOptions": {
Collapse file

‎typings/globals.d.ts‎

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare type TypedArray = Uint16Array | Uint32Array | Uint8Array | Uint8ClampedArray | Int16Array | Int32Array | Int8Array | BigInt64Array | Float32Array | Float64Array | BigUint64Array;
Collapse file
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
declare function InternalBinding(binding: 'config'): {
2+
isDebugBuild: boolean,
3+
hasOpenSSL: boolean,
4+
fipsMode: boolean,
5+
hasIntl: boolean,
6+
hasTracing: boolean,
7+
hasNodeOptions: boolean,
8+
hasInspector: boolean,
9+
noBrowserGlobals: boolean,
10+
bits: number,
11+
hasDtrace: boolean
12+
}
Collapse file
-42Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,3 @@
1-
declare type TypedArray = Uint16Array | Uint32Array | Uint8Array | Uint8ClampedArray | Int16Array | Int32Array | Int8Array | BigInt64Array | Float32Array | Float64Array | BigUint64Array;
2-
declare function InternalBinding(binding: 'types'): {
3-
isAsyncFunction(value: unknown): value is (...args: unknown[]) => Promise<unknown>,
4-
isGeneratorFunction(value: unknown): value is GeneratorFunction,
5-
isAnyArrayBuffer(value: unknown): value is (ArrayBuffer | SharedArrayBuffer),
6-
isArrayBuffer(value: unknown): value is ArrayBuffer,
7-
isArgumentsObject(value: unknown): value is ArrayLike<unknown>,
8-
isBoxedPrimitive(value: unknown): value is (BigInt | Boolean | Number | String | Symbol),
9-
isDataView(value: unknown): value is DataView,
10-
isExternal(value: unknown): value is Object,
11-
isMap(value: unknown): value is Map<unknown, unknown>,
12-
isMapIterator: (value: unknown) => value is IterableIterator<unknown>,
13-
isModuleNamespaceObject: (value: unknown) => value is {[Symbol.toStringTag]: 'Module', [key: string]: any},
14-
isNativeError: (value: unknown) => Error,
15-
isPromise: (value: unknown) => value is Promise<unknown>,
16-
isSet: (value: unknown) => value is Set<unknown>,
17-
isSetIterator: (value: unknown) => value is IterableIterator<unknown>,
18-
isWeakMap: (value: unknown) => value is WeakMap<object, unknown>,
19-
isWeakSet: (value: unknown) => value is WeakSet<object>,
20-
isRegExp: (value: unknown) => RegExp,
21-
isDate: (value: unknown) => Date,
22-
isTypedArray: (value: unknown) => value is TypedArray,
23-
isStringObject: (value: unknown) => value is String,
24-
isNumberObject: (value: unknown) => value is Number,
25-
isBooleanObject: (value: unknown) => value is Boolean,
26-
isBigIntObject: (value: unknown) => value is BigInt,
27-
};
281
declare function InternalBinding(binding: 'constants'): {
292
os: {
303
UV_UDP_REUSEADDR: 4,
@@ -427,18 +400,3 @@ declare function InternalBinding(binding: 'constants'): {
427400
TRACE_EVENT_PHASE_LINK_IDS: 61
428401
}
429402
};
430-
declare function InternalBinding(binding: 'config'): {
431-
isDebugBuild: boolean,
432-
hasOpenSSL: boolean,
433-
fipsMode: boolean,
434-
hasIntl: boolean,
435-
hasTracing: boolean,
436-
hasNodeOptions: boolean,
437-
hasInspector: boolean,
438-
noBrowserGlobals: boolean,
439-
bits: number,
440-
hasDtrace: boolean
441-
}
442-
declare function InternalBinding(binding: 'symbols'): {
443-
[name: string]: symbol;
444-
}
Collapse file
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
declare function InternalBinding(binding: 'symbols'): {
2+
[name: string]: symbol;
3+
}
Collapse file

‎typings/internalBinding/types.d.ts‎

Copy file name to clipboard
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
declare function InternalBinding(binding: 'types'): {
2+
isAsyncFunction(value: unknown): value is (...args: unknown[]) => Promise<unknown>,
3+
isGeneratorFunction(value: unknown): value is GeneratorFunction,
4+
isAnyArrayBuffer(value: unknown): value is (ArrayBuffer | SharedArrayBuffer),
5+
isArrayBuffer(value: unknown): value is ArrayBuffer,
6+
isArgumentsObject(value: unknown): value is ArrayLike<unknown>,
7+
isBoxedPrimitive(value: unknown): value is (BigInt | Boolean | Number | String | Symbol),
8+
isDataView(value: unknown): value is DataView,
9+
isExternal(value: unknown): value is Object,
10+
isMap(value: unknown): value is Map<unknown, unknown>,
11+
isMapIterator: (value: unknown) => value is IterableIterator<unknown>,
12+
isModuleNamespaceObject: (value: unknown) => value is {[Symbol.toStringTag]: 'Module', [key: string]: any},
13+
isNativeError: (value: unknown) => Error,
14+
isPromise: (value: unknown) => value is Promise<unknown>,
15+
isSet: (value: unknown) => value is Set<unknown>,
16+
isSetIterator: (value: unknown) => value is IterableIterator<unknown>,
17+
isWeakMap: (value: unknown) => value is WeakMap<object, unknown>,
18+
isWeakSet: (value: unknown) => value is WeakSet<object>,
19+
isRegExp: (value: unknown) => RegExp,
20+
isDate: (value: unknown) => Date,
21+
isTypedArray: (value: unknown) => value is TypedArray,
22+
isStringObject: (value: unknown) => value is String,
23+
isNumberObject: (value: unknown) => value is Number,
24+
isBooleanObject: (value: unknown) => value is Boolean,
25+
isBigIntObject: (value: unknown) => value is BigInt,
26+
};

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.