Skip to content
Merged
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 types/aws-lambda-fastify/aws-lambda-fastify-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import awsLambdaFastify from 'aws-lambda-fastify';
import fastify, { FastifyReply, FastifyRequest } from 'fastify';
import { Context, Callback } from 'aws-lambda/handler';
import { RouteGenericInterface } from 'fastify/types/route';
import { Server, IncomingMessage, ServerResponse } from 'node:http';
import { Server, IncomingMessage, ServerResponse } from 'http';

const app = fastify();
const proxy = awsLambdaFastify(app, { binaryMimeTypes: ['application/octet-stream'] });
Expand Down
2 changes: 1 addition & 1 deletion types/body/test/body-tests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createServer } from "node:http";
import { createServer } from "http";
import textBody = require("body");
import formBody = require("body/form");
import jsonBody = require("body/json");
Expand Down
2 changes: 1 addition & 1 deletion types/isomorphic-git__lightning-fs/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/// <reference types="node" />

import { Stats } from 'node:fs';
import { Stats } from 'fs';

declare class LightningFS {
/** Collection of FS Operations that returns Promises */
Expand Down
5 changes: 0 additions & 5 deletions types/node/assert.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
declare module 'node:assert' {
import assert = require('assert');
export = assert;
}

declare module 'assert' {
/** An alias of `assert.ok()`. */
function assert(value: any, message?: string | Error): asserts value;
Expand Down
7 changes: 0 additions & 7 deletions types/node/async_hooks.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/**
* Async Hooks module: https://nodejs.org/api/async_hooks.html
*/
declare module 'node:async_hooks' {
export * from 'async_hooks';
}

/**
* Async Hooks module: https://nodejs.org/api/async_hooks.html
*/
Expand Down
4 changes: 0 additions & 4 deletions types/node/buffer.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
declare module 'node:buffer' {
export * from 'buffer';
}

declare module 'buffer' {
export const INSPECT_MAX_BYTES: number;
export const kMaxLength: number;
Expand Down
12 changes: 4 additions & 8 deletions types/node/child_process.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
declare module 'node:child_process' {
export * from 'child_process';
}

declare module 'child_process' {
import { BaseEncodingOptions } from 'node:fs';
import * as events from 'node:events';
import * as net from 'node:net';
import { Writable, Readable, Stream, Pipe } from 'node:stream';
import { BaseEncodingOptions } from 'fs';
import * as events from 'events';
import * as net from 'net';
import { Writable, Readable, Stream, Pipe } from 'stream';

type Serializable = string | object | number | boolean;
type SendHandle = net.Socket | net.Server;
Expand Down
10 changes: 3 additions & 7 deletions types/node/cluster.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
declare module 'node:cluster' {
export * from 'cluster';
}

declare module 'cluster' {
import * as child from 'node:child_process';
import EventEmitter = require('node:events');
import * as net from 'node:net';
import * as child from 'child_process';
import EventEmitter = require('events');
import * as net from 'net';

// interfaces
interface ClusterSettings {
Expand Down
6 changes: 1 addition & 5 deletions types/node/console.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
declare module 'node:console' {
export = console;
}

declare module 'console' {
import { InspectOptions } from 'node:util';
import { InspectOptions } from 'util';

global {
// This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
Expand Down
12 changes: 3 additions & 9 deletions types/node/constants.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
declare module 'node:constants' {
import exp = require('constants');
export = exp;
}

/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
declare module 'constants' {
import { constants as osConstants, SignalConstants } from 'node:os';
import { constants as cryptoConstants } from 'node:crypto';
import { constants as fsConstants } from 'node:fs';
import { constants as osConstants, SignalConstants } from 'os';
import { constants as cryptoConstants } from 'crypto';
import { constants as fsConstants } from 'fs';

const exp: typeof osConstants.errno &
typeof osConstants.priority &
Expand Down
6 changes: 1 addition & 5 deletions types/node/crypto.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
declare module 'node:crypto' {
export * from 'crypto';
}

declare module 'crypto' {
import * as stream from 'node:stream';
import * as stream from 'stream';

interface Certificate {
/**
Expand Down
10 changes: 3 additions & 7 deletions types/node/dgram.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
declare module 'node:dgram' {
export * from 'dgram';
}

declare module 'dgram' {
import { AddressInfo } from 'node:net';
import * as dns from 'node:dns';
import EventEmitter = require('node:events');
import { AddressInfo } from 'net';
import * as dns from 'dns';
import EventEmitter = require('events');

interface RemoteInfo {
address: string;
Expand Down
6 changes: 1 addition & 5 deletions types/node/dns.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
declare module 'node:dns' {
export * from 'dns';
}

declare module 'dns' {
import * as dnsPromises from "node:dns/promises";
import * as dnsPromises from "dns/promises";

// Supported getaddrinfo flags.
export const ADDRCONFIG: number;
Expand Down
6 changes: 1 addition & 5 deletions types/node/dns/promises.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
declare module "node:dns/promises" {
export * from "dns/promises";
}

declare module "dns/promises" {
import {
LookupAddress,
Expand All @@ -18,7 +14,7 @@ declare module "dns/promises" {
RecordWithTtl,
ResolveOptions,
ResolverOptions,
} from "node:dns";
} from "dns";

function getServers(): string[];

Expand Down
6 changes: 1 addition & 5 deletions types/node/domain.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
declare module 'node:domain' {
export * from 'domain';
}

declare module 'domain' {
import EventEmitter = require('node:events');
import EventEmitter = require('events');

global {
namespace NodeJS {
Expand Down
5 changes: 0 additions & 5 deletions types/node/events.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
declare module 'node:events' {
import EventEmitter = require('events');
export = EventEmitter;
}

declare module 'events' {
interface EventEmitterOptions {
/**
Expand Down
12 changes: 4 additions & 8 deletions types/node/fs.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
declare module 'node:fs' {
export * from 'fs';
}

declare module 'fs' {
import * as stream from 'node:stream';
import EventEmitter = require('node:events');
import { URL } from 'node:url';
import * as promises from 'node:fs/promises';
import * as stream from 'stream';
import EventEmitter = require('events');
import { URL } from 'url';
import * as promises from 'fs/promises';

export { promises };
/**
Expand Down
6 changes: 1 addition & 5 deletions types/node/fs/promises.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
declare module 'fs/promises' {
export * from 'node:fs/promises';
}

declare module 'node:fs/promises' {
import {
Stats,
BigIntStats,
Expand All @@ -20,7 +16,7 @@ declare module 'node:fs/promises' {
BufferEncodingOption,
OpenMode,
Mode,
} from 'node:fs';
} from 'fs';

interface FileHandle {
/**
Expand Down
10 changes: 3 additions & 7 deletions types/node/http.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
declare module 'node:http' {
export * from 'http';
}

declare module 'http' {
import * as stream from 'node:stream';
import { URL } from 'node:url';
import { Socket, Server as NetServer } from 'node:net';
import * as stream from 'stream';
import { URL } from 'url';
import { Socket, Server as NetServer } from 'net';

// incoming headers will never contain number
interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
Expand Down
20 changes: 8 additions & 12 deletions types/node/http2.d.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
declare module 'node:http2' {
export * from 'http2';
}

declare module 'http2' {
import EventEmitter = require('node:events');
import * as fs from 'node:fs';
import * as net from 'node:net';
import * as stream from 'node:stream';
import * as tls from 'node:tls';
import * as url from 'node:url';
import EventEmitter = require('events');
import * as fs from 'fs';
import * as net from 'net';
import * as stream from 'stream';
import * as tls from 'tls';
import * as url from 'url';

import {
IncomingHttpHeaders as Http1IncomingHttpHeaders,
OutgoingHttpHeaders,
IncomingMessage,
ServerResponse,
} from 'node:http';
export { OutgoingHttpHeaders } from 'node:http';
} from 'http';
export { OutgoingHttpHeaders } from 'http';

export interface IncomingHttpStatusHeader {
":status"?: number;
Expand Down
10 changes: 3 additions & 7 deletions types/node/https.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
declare module 'node:https' {
export * from 'https';
}

declare module 'https' {
import * as tls from 'node:tls';
import * as http from 'node:http';
import { URL } from 'node:url';
import * as tls from 'tls';
import * as http from 'http';
import { URL } from 'url';

type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions;

Expand Down
9 changes: 1 addition & 8 deletions types/node/inspector.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,11 @@

// tslint:disable:max-line-length

/**
* The inspector module provides an API for interacting with the V8 inspector.
*/
declare module 'node:inspector' {
export * from 'inspector';
}

/**
* The inspector module provides an API for interacting with the V8 inspector.
*/
declare module 'inspector' {
import EventEmitter = require('node:events');
import EventEmitter = require('events');

interface InspectorNotification<T> {
method: string;
Expand Down
7 changes: 1 addition & 6 deletions types/node/module.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
declare module 'node:module' {
import Module = require('module');
export = Module;
}

declare module 'module' {
import { URL } from 'node:url';
import { URL } from 'url';
namespace Module {
/**
* Updates all the live bindings for builtin ES Modules to match the properties of the CommonJS exports.
Expand Down
10 changes: 3 additions & 7 deletions types/node/net.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
declare module 'node:net' {
export * from 'net';
}

declare module 'net' {
import * as stream from 'node:stream';
import EventEmitter = require('node:events');
import * as dns from 'node:dns';
import * as stream from 'stream';
import EventEmitter = require('events');
import * as dns from 'dns';

type LookupFunction = (
hostname: string,
Expand Down
2 changes: 1 addition & 1 deletion types/node/node-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import './test/buffer';
import './test/querystring';
import './test/url';

import assert = require('node:assert');
import assert = require('assert');

assert(true, "it's working");

Expand Down
4 changes: 0 additions & 4 deletions types/node/os.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
declare module 'node:os' {
export * from 'os';
}

declare module 'os' {
interface CpuInfo {
model: string;
Expand Down
5 changes: 0 additions & 5 deletions types/node/path.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
declare module 'node:path' {
import path = require('path');
export = path;
}

declare module 'path' {
namespace path {
/**
Expand Down
6 changes: 1 addition & 5 deletions types/node/perf_hooks.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
declare module 'node:perf_hooks' {
export * from 'perf_hooks';
}

declare module 'perf_hooks' {
import { AsyncResource } from 'node:async_hooks';
import { AsyncResource } from 'async_hooks';

type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http';

Expand Down
6 changes: 1 addition & 5 deletions types/node/process.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
declare module 'node:process' {
export = process;
}

declare module 'process' {
import * as tty from 'node:tty';
import * as tty from 'tty';

global {
var process: NodeJS.Process;
Expand Down
11 changes: 0 additions & 11 deletions types/node/punycode.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
/**
* @deprecated since v7.0.0
* The version of the punycode module bundled in Node.js is being deprecated.
* In a future major version of Node.js this module will be removed.
* Users currently depending on the punycode module should switch to using
* the userland-provided Punycode.js module instead.
*/
declare module 'node:punycode' {
export * from 'punycode';
}

/**
* @deprecated since v7.0.0
* The version of the punycode module bundled in Node.js is being deprecated.
Expand Down
Loading