Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/internal/bootstrap/realm.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const legacyWrapperList = new SafeSet([

/**
* Set up internalBinding() in the closure.
* @type {import('typings/globals').internalBinding}
* @type {typeof globalThis.internalBinding}
*/
let internalBinding;
{
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/modules/esm/resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function emitLegacyIndexDeprecation(url, path, pkgPath, base, main) {
* 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node)
* 5. NOT_FOUND
* @param {URL} packageJSONUrl
* @param {import('typings/internalBinding/modules').PackageConfig} packageConfig
* @param {import('../../../../typings/internalBinding/modules').PackageConfig} packageConfig
* @param {string | URL | undefined} base
* @returns {URL}
*/
Expand Down
8 changes: 4 additions & 4 deletions lib/internal/modules/package_json_reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ const {


/**
* @typedef {import('typings/internalBinding/modules').DeserializedPackageConfig} DeserializedPackageConfig
* @typedef {import('typings/internalBinding/modules').PackageConfig} PackageConfig
* @typedef {import('typings/internalBinding/modules').SerializedPackageConfig} SerializedPackageConfig
* @typedef {import('../../../typings/internalBinding/modules').DeserializedPackageConfig} DeserializedPackageConfig
* @typedef {import('../../../typings/internalBinding/modules').PackageConfig} PackageConfig
* @typedef {import('../../../typings/internalBinding/modules').SerializedPackageConfig} SerializedPackageConfig
*/

/**
Expand Down Expand Up @@ -220,7 +220,7 @@ function getNearestParentPackageJSON(checkPath) {
/**
* Returns the package configuration for the given resolved URL.
* @param {URL | string} resolved - The resolved URL.
* @returns {import('typings/internalBinding/modules').PackageConfig} - The package configuration.
* @returns {import('../../../typings/internalBinding/modules').PackageConfig} - The package configuration.
*/
function getPackageScopeConfig(resolved) {
const result = loaderMethods.getPackageScopeConfig(`${resolved}`);
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lib": ["ESNext", "DOM"],
"target": "ESNext",
"module": "CommonJS",
"baseUrl": ".",
"moduleDetection": "force",
"paths": {
"_http_agent": ["./lib/_http_agent.js"],
"_http_client": ["./lib/_http_client.js"],
Expand Down
5 changes: 3 additions & 2 deletions typings/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ interface InternalBindingMap {

type InternalBindingKeys = keyof InternalBindingMap;

declare function internalBinding<T extends InternalBindingKeys>(binding: T): InternalBindingMap[T]

declare global {
// Supplied to internal modules by the builtin function wrapper.
function internalBinding<T extends InternalBindingKeys>(binding: T): InternalBindingMap[T]

type TypedArray =
| Uint8Array
| Uint8ClampedArray
Expand Down
2 changes: 2 additions & 0 deletions typings/internalBinding/icu.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { FastBuffer as Buffer } from 'internal/buffer';

export interface ICUBinding {
Converter: object;
decode(
Expand Down
Loading