|
| 1 | +// the installed @types/node package is version 12 so that backwards compatibility is maintained |
| 2 | +// node: prefix is removed by Babel, so define the types of those packages here so that TypeScript can find them |
| 3 | + |
| 4 | +declare module "node:fs" { |
| 5 | + import fs from "fs" |
| 6 | + export = fs |
| 7 | +} |
| 8 | + |
| 9 | +declare module "node:path" { |
| 10 | + import path from "path" |
| 11 | + export = path |
| 12 | +} |
| 13 | + |
| 14 | +declare module "node:child_process" { |
| 15 | + import child_process from "child_process" |
| 16 | + export = child_process |
| 17 | +} |
| 18 | + |
| 19 | +declare module "node:os" { |
| 20 | + import os from "os" |
| 21 | + export = os |
| 22 | +} |
| 23 | + |
| 24 | +declare module "node:util" { |
| 25 | + import util from "util" |
| 26 | + export = util |
| 27 | +} |
| 28 | + |
| 29 | +declare module "node:stream" { |
| 30 | + import stream from "stream" |
| 31 | + export = stream |
| 32 | +} |
| 33 | + |
| 34 | +declare module "node:zlib" { |
| 35 | + import zlib from "zlib" |
| 36 | + export = zlib |
| 37 | +} |
| 38 | + |
| 39 | +declare module "node:crypto" { |
| 40 | + import crypto from "crypto" |
| 41 | + export = crypto |
| 42 | +} |
| 43 | +declare module "node:http" { |
| 44 | + import http from "http" |
| 45 | + export = http |
| 46 | +} |
| 47 | + |
| 48 | +declare module "node:https" { |
| 49 | + import https from "https" |
| 50 | + export = https |
| 51 | +} |
| 52 | + |
| 53 | +declare module "node:events" { |
| 54 | + import events from "events" |
| 55 | + export = events |
| 56 | +} |
| 57 | + |
| 58 | +declare module "node:assert" { |
| 59 | + import assert from "assert" |
| 60 | + export = assert |
| 61 | +} |
| 62 | + |
| 63 | +declare module "node:constants" { |
| 64 | + import constants from "constants" |
| 65 | + export = constants |
| 66 | +} |
| 67 | + |
| 68 | +declare module "node:querystring" { |
| 69 | + import querystring from "querystring" |
| 70 | + export = querystring |
| 71 | +} |
| 72 | + |
| 73 | +declare module "node:url" { |
| 74 | + import url from "url" |
| 75 | + export = url |
| 76 | +} |
| 77 | + |
| 78 | +declare module "node:fs/promises" { |
| 79 | + import fsPromises from "fs/promises" |
| 80 | + export = fsPromises |
| 81 | +} |
| 82 | + |
| 83 | +declare module "node:path/posix" { |
| 84 | + import pathPosix from "path/posix" |
| 85 | + export = pathPosix |
| 86 | +} |
| 87 | + |
| 88 | +declare module "node:path/win32" { |
| 89 | + import pathWin32 from "path/win32" |
| 90 | + export = pathWin32 |
| 91 | +} |
0 commit comments