Skip to content

Commit 5d6d494

Browse files
committed
lib: support clion for autocompletion
1 parent e49ef49 commit 5d6d494

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/internal/bootstrap/loaders.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,9 @@ const schemelessBlockList = new SafeSet([
160160
};
161161
}
162162

163-
/**
164-
* @typedef {import('../../../typings/bindings').InternalBindingMap} InternalBindingMap
165-
*/
166163
// Set up internalBinding() in the closure.
167-
// Do not use `internalBinding` variable name due to the breakage of TypeScript autocompletion.
168164
/**
169-
* @type {<T extends keyof InternalBindingMap>(binding: T) => InternalBindingMap[T]}
165+
* @type {import('../../../typings/bindings').InternalBinding}
170166
*/
171167
let internalBinding;
172168
{

typings/bindings.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ export type InternalBindingMap = {
3131
util: UtilBindings;
3232
worker: WorkerBinding;
3333
}
34+
35+
export type InternalBinding<T extends keyof InternalBindingMap> = (binding: T) => InternalBindingMap[T];

0 commit comments

Comments
 (0)