您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

index.d.ts 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. // Type definitions for non-npm package Node.js 11.13
  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. // Matthieu Sieben <https://github.com/matthieusieben>
  25. // Mohsen Azimi <https://github.com/mohsen1>
  26. // Nicolas Even <https://github.com/n-e>
  27. // Nicolas Voigt <https://github.com/octo-sniffle>
  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. // Jeremie Rodriguez <https://github.com/jeremiergz>
  36. // Samuel Ainsworth <https://github.com/samuela>
  37. // Kyle Uehlein <https://github.com/kuehlein>
  38. // Jordi Oliveras Rovira <https://github.com/j-oliveras>
  39. // Thanik Bhongbhibhat <https://github.com/bhongy>
  40. // Ivan Sieder <https://github.com/ivansieder>
  41. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
  42. // NOTE: These definitions support NodeJS and TypeScript 3.2.
  43. // NOTE: TypeScript version-specific augmentations can be found in the following paths:
  44. // - ~/base.d.ts - Shared definitions common to all TypeScript versions
  45. // - ~/index.d.ts - Definitions specific to TypeScript 2.1
  46. // - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2
  47. // NOTE: Augmentations for TypeScript 3.2 and later should use individual files for overrides
  48. // within the respective ~/ts3.2 (or later) folder. However, this is disallowed for versions
  49. // prior to TypeScript 3.2, so the older definitions will be found here.
  50. // Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
  51. /// <reference path="base.d.ts" />
  52. // TypeScript 2.1-specific augmentations:
  53. // Forward-declarations for needed types from es2015 and later (in case users are using `--lib es5`)
  54. // Empty interfaces are used here which merge fine with the real declarations in the lib XXX files
  55. // just to ensure the names are known and node typings can be sued without importing these libs.
  56. // if someone really needs these types the libs need to be added via --lib or in tsconfig.json
  57. interface MapConstructor { }
  58. interface WeakMapConstructor { }
  59. interface SetConstructor { }
  60. interface WeakSetConstructor { }
  61. interface Set<T> {}
  62. interface Map<K, V> {}
  63. interface ReadonlySet<T> {}
  64. interface IteratorResult<T> { }
  65. interface Iterable<T> { }
  66. interface Iterator<T> {
  67. next(value?: any): IteratorResult<T>;
  68. }
  69. interface IterableIterator<T> { }
  70. interface AsyncIterableIterator<T> {}
  71. interface SymbolConstructor {
  72. readonly iterator: symbol;
  73. readonly asyncIterator: symbol;
  74. }
  75. declare var Symbol: SymbolConstructor;
  76. // even this is just a forward declaration some properties are added otherwise
  77. // it would be allowed to pass anything to e.g. Buffer.from()
  78. interface SharedArrayBuffer {
  79. readonly byteLength: number;
  80. slice(begin?: number, end?: number): SharedArrayBuffer;
  81. }
  82. declare module "util" {
  83. namespace inspect {
  84. const custom: symbol;
  85. }
  86. namespace promisify {
  87. const custom: symbol;
  88. }
  89. namespace types {
  90. function isBigInt64Array(value: any): boolean;
  91. function isBigUint64Array(value: any): boolean;
  92. }
  93. }