1// Type definitions for non-npm package Node.js 12.12 2// Project: http://nodejs.org/ 3// Definitions by: Microsoft TypeScript <https://github.com/Microsoft> 4// DefinitelyTyped <https://github.com/DefinitelyTyped> 5// Alberto Schiabel <https://github.com/jkomyno> 6// Alexander T. <https://github.com/a-tarasyuk> 7// Alvis HT Tang <https://github.com/alvis> 8// Andrew Makarov <https://github.com/r3nya> 9// Benjamin Toueg <https://github.com/btoueg> 10// Bruno Scheufler <https://github.com/brunoscheufler> 11// Chigozirim C. <https://github.com/smac89> 12// Christian Vaagland Tellnes <https://github.com/tellnes> 13// David Junger <https://github.com/touffy> 14// Deividas Bakanas <https://github.com/DeividasBakanas> 15// Eugene Y. Q. Shen <https://github.com/eyqs> 16// Flarna <https://github.com/Flarna> 17// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK> 18// Hoàng Văn Khải <https://github.com/KSXGitHub> 19// Huw <https://github.com/hoo29> 20// Kelvin Jin <https://github.com/kjin> 21// Klaus Meinhardt <https://github.com/ajafff> 22// Lishude <https://github.com/islishude> 23// Mariusz Wiktorczyk <https://github.com/mwiktorczyk> 24// Mohsen Azimi <https://github.com/mohsen1> 25// Nicolas Even <https://github.com/n-e> 26// Nicolas Voigt <https://github.com/octo-sniffle> 27// Nikita Galkin <https://github.com/galkin> 28// Parambir Singh <https://github.com/parambirs> 29// Sebastian Silbermann <https://github.com/eps1lon> 30// Simon Schick <https://github.com/SimonSchick> 31// Thomas den Hollander <https://github.com/ThomasdenH> 32// Wilco Bakker <https://github.com/WilcoBakker> 33// wwwy3y3 <https://github.com/wwwy3y3> 34// Zane Hannan AU <https://github.com/ZaneHannanAU> 35// Samuel Ainsworth <https://github.com/samuela> 36// Kyle Uehlein <https://github.com/kuehlein> 37// Jordi Oliveras Rovira <https://github.com/j-oliveras> 38// Thanik Bhongbhibhat <https://github.com/bhongy> 39// Marcin Kopacz <https://github.com/chyzwar> 40// Trivikram Kamat <https://github.com/trivikr> 41// Minh Son Nguyen <https://github.com/nguymin4> 42// Junxiao Shi <https://github.com/yoursunny> 43// Ilia Baryshnikov <https://github.com/qwelias> 44// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped 45 46// NOTE: These definitions support NodeJS and TypeScript 3.2. 47 48// NOTE: TypeScript version-specific augmentations can be found in the following paths: 49// - ~/base.d.ts - Shared definitions common to all TypeScript versions 50// - ~/index.d.ts - Definitions specific to TypeScript 2.1 51// - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 52 53// NOTE: Augmentations for TypeScript 3.2 and later should use individual files for overrides 54// within the respective ~/ts3.2 (or later) folder. However, this is disallowed for versions 55// prior to TypeScript 3.2, so the older definitions will be found here. 56 57// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: 58/// <reference path="base.d.ts" /> 59 60// TypeScript 2.1-specific augmentations: 61 62// Forward-declarations for needed types from es2015 and later (in case users are using `--lib es5`) 63// Empty interfaces are used here which merge fine with the real declarations in the lib XXX files 64// just to ensure the names are known and node typings can be sued without importing these libs. 65// if someone really needs these types the libs need to be added via --lib or in tsconfig.json 66interface MapConstructor { } 67interface WeakMapConstructor { } 68interface SetConstructor { } 69interface WeakSetConstructor { } 70interface Set<T> {} 71interface Map<K, V> {} 72interface ReadonlySet<T> {} 73interface Iterable<T> { } 74interface IteratorResult<T> { } 75interface AsyncIterable<T> { } 76interface Iterator<T> { 77 next(value?: any): IteratorResult<T>; 78} 79interface IterableIterator<T> { } 80interface AsyncIterableIterator<T> {} 81interface SymbolConstructor { 82 readonly iterator: symbol; 83 readonly asyncIterator: symbol; 84} 85declare var Symbol: SymbolConstructor; 86// even this is just a forward declaration some properties are added otherwise 87// it would be allowed to pass anything to e.g. Buffer.from() 88interface SharedArrayBuffer { 89 readonly byteLength: number; 90 slice(begin?: number, end?: number): SharedArrayBuffer; 91} 92 93declare module "util" { 94 namespace inspect { 95 const custom: symbol; 96 } 97 namespace promisify { 98 const custom: symbol; 99 } 100 namespace types { 101 function isBigInt64Array(value: any): boolean; 102 function isBigUint64Array(value: any): boolean; 103 } 104} 105