@aligent/cdk-prerender-proxy 0.2.7 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/index.js +1 -1
  2. package/index.ts +29 -0
  3. package/lib/error-response-construct.ts +54 -0
  4. package/lib/handlers/cache-control.ts +1 -4
  5. package/lib/handlers/error-response.ts +0 -1
  6. package/lib/handlers/prerender.ts +2 -3
  7. package/lib/prerender-cf-cache-control-construct.ts +58 -0
  8. package/lib/prerender-check-construct.ts +43 -0
  9. package/lib/prerender-construct.ts +55 -0
  10. package/lib/prerender-lambda-construct.ts +48 -0
  11. package/package.json +17 -26
  12. package/index.d.ts +0 -6
  13. package/lib/error-response-construct.d.ts +0 -9
  14. package/lib/error-response-construct.js +0 -32
  15. package/lib/handlers/node_modules/.package-lock.json +0 -55
  16. package/lib/handlers/node_modules/@types/aws-lambda/LICENSE +0 -21
  17. package/lib/handlers/node_modules/@types/aws-lambda/README.md +0 -16
  18. package/lib/handlers/node_modules/@types/aws-lambda/common/api-gateway.d.ts +0 -79
  19. package/lib/handlers/node_modules/@types/aws-lambda/common/cloudfront.d.ts +0 -79
  20. package/lib/handlers/node_modules/@types/aws-lambda/handler.d.ts +0 -171
  21. package/lib/handlers/node_modules/@types/aws-lambda/index.d.ts +0 -85
  22. package/lib/handlers/node_modules/@types/aws-lambda/package.json +0 -210
  23. package/lib/handlers/node_modules/@types/aws-lambda/trigger/alb.d.ts +0 -48
  24. package/lib/handlers/node_modules/@types/aws-lambda/trigger/api-gateway-authorizer.d.ts +0 -174
  25. package/lib/handlers/node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts +0 -187
  26. package/lib/handlers/node_modules/@types/aws-lambda/trigger/appsync-resolver.d.ts +0 -51
  27. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudformation-custom-resource.d.ts +0 -68
  28. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts +0 -20
  29. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudfront-response.d.ts +0 -21
  30. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudwatch-events.d.ts +0 -8
  31. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudwatch-logs.d.ts +0 -37
  32. package/lib/handlers/node_modules/@types/aws-lambda/trigger/codebuild-cloudwatch-state.d.ts +0 -104
  33. package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-action.d.ts +0 -31
  34. package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-pipeline.d.ts +0 -32
  35. package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-stage.d.ts +0 -23
  36. package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch.d.ts +0 -11
  37. package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline.d.ts +0 -55
  38. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/_common.d.ts +0 -41
  39. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/create-auth-challenge.d.ts +0 -22
  40. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-email-sender.d.ts +0 -86
  41. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-message.d.ts +0 -44
  42. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/define-auth-challenge.d.ts +0 -21
  43. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/index.d.ts +0 -119
  44. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-authentication.d.ts +0 -15
  45. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-confirmation.d.ts +0 -22
  46. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-authentication.d.ts +0 -15
  47. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-signup.d.ts +0 -31
  48. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation.d.ts +0 -45
  49. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/user-migration.d.ts +0 -39
  50. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/verify-auth-challenge-response.d.ts +0 -20
  51. package/lib/handlers/node_modules/@types/aws-lambda/trigger/connect-contact-flow.d.ts +0 -65
  52. package/lib/handlers/node_modules/@types/aws-lambda/trigger/dynamodb-stream.d.ts +0 -45
  53. package/lib/handlers/node_modules/@types/aws-lambda/trigger/eventbridge.d.ts +0 -18
  54. package/lib/handlers/node_modules/@types/aws-lambda/trigger/iot.d.ts +0 -28
  55. package/lib/handlers/node_modules/@types/aws-lambda/trigger/kinesis-firehose-transformation.d.ts +0 -45
  56. package/lib/handlers/node_modules/@types/aws-lambda/trigger/kinesis-stream.d.ts +0 -28
  57. package/lib/handlers/node_modules/@types/aws-lambda/trigger/lex.d.ts +0 -116
  58. package/lib/handlers/node_modules/@types/aws-lambda/trigger/msk.d.ts +0 -21
  59. package/lib/handlers/node_modules/@types/aws-lambda/trigger/s3-batch.d.ts +0 -41
  60. package/lib/handlers/node_modules/@types/aws-lambda/trigger/s3.d.ts +0 -60
  61. package/lib/handlers/node_modules/@types/aws-lambda/trigger/ses.d.ts +0 -103
  62. package/lib/handlers/node_modules/@types/aws-lambda/trigger/sns.d.ts +0 -38
  63. package/lib/handlers/node_modules/@types/aws-lambda/trigger/sqs.d.ts +0 -46
  64. package/lib/handlers/node_modules/@types/node/LICENSE +0 -21
  65. package/lib/handlers/node_modules/@types/node/README.md +0 -16
  66. package/lib/handlers/node_modules/@types/node/assert/strict.d.ts +0 -4
  67. package/lib/handlers/node_modules/@types/node/assert.d.ts +0 -124
  68. package/lib/handlers/node_modules/@types/node/async_hooks.d.ts +0 -226
  69. package/lib/handlers/node_modules/@types/node/base.d.ts +0 -19
  70. package/lib/handlers/node_modules/@types/node/buffer.d.ts +0 -84
  71. package/lib/handlers/node_modules/@types/node/child_process.d.ts +0 -526
  72. package/lib/handlers/node_modules/@types/node/cluster.d.ts +0 -262
  73. package/lib/handlers/node_modules/@types/node/console.d.ts +0 -133
  74. package/lib/handlers/node_modules/@types/node/constants.d.ts +0 -13
  75. package/lib/handlers/node_modules/@types/node/crypto.d.ts +0 -1580
  76. package/lib/handlers/node_modules/@types/node/dgram.d.ts +0 -141
  77. package/lib/handlers/node_modules/@types/node/diagnostic_channel.d.ts +0 -34
  78. package/lib/handlers/node_modules/@types/node/dns/promises.d.ts +0 -97
  79. package/lib/handlers/node_modules/@types/node/dns.d.ts +0 -322
  80. package/lib/handlers/node_modules/@types/node/domain.d.ts +0 -24
  81. package/lib/handlers/node_modules/@types/node/events.d.ts +0 -93
  82. package/lib/handlers/node_modules/@types/node/fs/promises.d.ts +0 -592
  83. package/lib/handlers/node_modules/@types/node/fs.d.ts +0 -2239
  84. package/lib/handlers/node_modules/@types/node/globals.d.ts +0 -655
  85. package/lib/handlers/node_modules/@types/node/globals.global.d.ts +0 -1
  86. package/lib/handlers/node_modules/@types/node/http.d.ts +0 -434
  87. package/lib/handlers/node_modules/@types/node/http2.d.ts +0 -976
  88. package/lib/handlers/node_modules/@types/node/https.d.ts +0 -36
  89. package/lib/handlers/node_modules/@types/node/index.d.ts +0 -58
  90. package/lib/handlers/node_modules/@types/node/inspector.d.ts +0 -3041
  91. package/lib/handlers/node_modules/@types/node/module.d.ts +0 -52
  92. package/lib/handlers/node_modules/@types/node/net.d.ts +0 -326
  93. package/lib/handlers/node_modules/@types/node/os.d.ts +0 -239
  94. package/lib/handlers/node_modules/@types/node/package.json +0 -232
  95. package/lib/handlers/node_modules/@types/node/path.d.ts +0 -163
  96. package/lib/handlers/node_modules/@types/node/perf_hooks.d.ts +0 -310
  97. package/lib/handlers/node_modules/@types/node/process.d.ts +0 -461
  98. package/lib/handlers/node_modules/@types/node/punycode.d.ts +0 -75
  99. package/lib/handlers/node_modules/@types/node/querystring.d.ts +0 -28
  100. package/lib/handlers/node_modules/@types/node/readline.d.ts +0 -192
  101. package/lib/handlers/node_modules/@types/node/repl.d.ts +0 -395
  102. package/lib/handlers/node_modules/@types/node/stream/promises.d.ts +0 -67
  103. package/lib/handlers/node_modules/@types/node/stream.d.ts +0 -471
  104. package/lib/handlers/node_modules/@types/node/string_decoder.d.ts +0 -7
  105. package/lib/handlers/node_modules/@types/node/timers/promises.d.ts +0 -21
  106. package/lib/handlers/node_modules/@types/node/timers.d.ts +0 -27
  107. package/lib/handlers/node_modules/@types/node/tls.d.ts +0 -793
  108. package/lib/handlers/node_modules/@types/node/trace_events.d.ts +0 -61
  109. package/lib/handlers/node_modules/@types/node/ts3.6/assert.d.ts +0 -98
  110. package/lib/handlers/node_modules/@types/node/ts3.6/base.d.ts +0 -68
  111. package/lib/handlers/node_modules/@types/node/ts3.6/index.d.ts +0 -7
  112. package/lib/handlers/node_modules/@types/node/tty.d.ts +0 -66
  113. package/lib/handlers/node_modules/@types/node/url.d.ts +0 -116
  114. package/lib/handlers/node_modules/@types/node/util/types.d.ts +0 -53
  115. package/lib/handlers/node_modules/@types/node/util.d.ts +0 -156
  116. package/lib/handlers/node_modules/@types/node/v8.d.ts +0 -198
  117. package/lib/handlers/node_modules/@types/node/vm.d.ts +0 -152
  118. package/lib/handlers/node_modules/@types/node/wasi.d.ts +0 -86
  119. package/lib/handlers/node_modules/@types/node/worker_threads.d.ts +0 -282
  120. package/lib/handlers/node_modules/@types/node/zlib.d.ts +0 -361
  121. package/lib/handlers/node_modules/axios/CHANGELOG.md +0 -685
  122. package/lib/handlers/node_modules/axios/LICENSE +0 -19
  123. package/lib/handlers/node_modules/axios/README.md +0 -800
  124. package/lib/handlers/node_modules/axios/UPGRADE_GUIDE.md +0 -162
  125. package/lib/handlers/node_modules/axios/dist/axios.js +0 -1756
  126. package/lib/handlers/node_modules/axios/dist/axios.map +0 -1
  127. package/lib/handlers/node_modules/axios/dist/axios.min.js +0 -3
  128. package/lib/handlers/node_modules/axios/dist/axios.min.map +0 -1
  129. package/lib/handlers/node_modules/axios/index.d.ts +0 -161
  130. package/lib/handlers/node_modules/axios/index.js +0 -1
  131. package/lib/handlers/node_modules/axios/lib/adapters/README.md +0 -37
  132. package/lib/handlers/node_modules/axios/lib/adapters/http.js +0 -303
  133. package/lib/handlers/node_modules/axios/lib/adapters/xhr.js +0 -179
  134. package/lib/handlers/node_modules/axios/lib/axios.js +0 -56
  135. package/lib/handlers/node_modules/axios/lib/cancel/Cancel.js +0 -19
  136. package/lib/handlers/node_modules/axios/lib/cancel/CancelToken.js +0 -57
  137. package/lib/handlers/node_modules/axios/lib/cancel/isCancel.js +0 -5
  138. package/lib/handlers/node_modules/axios/lib/core/Axios.js +0 -95
  139. package/lib/handlers/node_modules/axios/lib/core/InterceptorManager.js +0 -52
  140. package/lib/handlers/node_modules/axios/lib/core/README.md +0 -7
  141. package/lib/handlers/node_modules/axios/lib/core/buildFullPath.js +0 -20
  142. package/lib/handlers/node_modules/axios/lib/core/createError.js +0 -18
  143. package/lib/handlers/node_modules/axios/lib/core/dispatchRequest.js +0 -79
  144. package/lib/handlers/node_modules/axios/lib/core/enhanceError.js +0 -42
  145. package/lib/handlers/node_modules/axios/lib/core/mergeConfig.js +0 -87
  146. package/lib/handlers/node_modules/axios/lib/core/settle.js +0 -25
  147. package/lib/handlers/node_modules/axios/lib/core/transformData.js +0 -20
  148. package/lib/handlers/node_modules/axios/lib/defaults.js +0 -98
  149. package/lib/handlers/node_modules/axios/lib/helpers/README.md +0 -7
  150. package/lib/handlers/node_modules/axios/lib/helpers/bind.js +0 -11
  151. package/lib/handlers/node_modules/axios/lib/helpers/buildURL.js +0 -70
  152. package/lib/handlers/node_modules/axios/lib/helpers/combineURLs.js +0 -14
  153. package/lib/handlers/node_modules/axios/lib/helpers/cookies.js +0 -53
  154. package/lib/handlers/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -24
  155. package/lib/handlers/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -14
  156. package/lib/handlers/node_modules/axios/lib/helpers/isAxiosError.js +0 -11
  157. package/lib/handlers/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -68
  158. package/lib/handlers/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
  159. package/lib/handlers/node_modules/axios/lib/helpers/parseHeaders.js +0 -53
  160. package/lib/handlers/node_modules/axios/lib/helpers/spread.js +0 -27
  161. package/lib/handlers/node_modules/axios/lib/utils.js +0 -351
  162. package/lib/handlers/node_modules/axios/package.json +0 -86
  163. package/lib/handlers/node_modules/buffer-from/LICENSE +0 -21
  164. package/lib/handlers/node_modules/buffer-from/index.js +0 -69
  165. package/lib/handlers/node_modules/buffer-from/package.json +0 -19
  166. package/lib/handlers/node_modules/buffer-from/readme.md +0 -69
  167. package/lib/handlers/node_modules/follow-redirects/LICENSE +0 -18
  168. package/lib/handlers/node_modules/follow-redirects/README.md +0 -148
  169. package/lib/handlers/node_modules/follow-redirects/debug.js +0 -14
  170. package/lib/handlers/node_modules/follow-redirects/http.js +0 -1
  171. package/lib/handlers/node_modules/follow-redirects/https.js +0 -1
  172. package/lib/handlers/node_modules/follow-redirects/index.js +0 -531
  173. package/lib/handlers/node_modules/follow-redirects/package.json +0 -59
  174. package/lib/handlers/node_modules/source-map/CHANGELOG.md +0 -301
  175. package/lib/handlers/node_modules/source-map/LICENSE +0 -28
  176. package/lib/handlers/node_modules/source-map/README.md +0 -742
  177. package/lib/handlers/node_modules/source-map/dist/source-map.debug.js +0 -3234
  178. package/lib/handlers/node_modules/source-map/dist/source-map.js +0 -3233
  179. package/lib/handlers/node_modules/source-map/dist/source-map.min.js +0 -2
  180. package/lib/handlers/node_modules/source-map/dist/source-map.min.js.map +0 -1
  181. package/lib/handlers/node_modules/source-map/lib/array-set.js +0 -121
  182. package/lib/handlers/node_modules/source-map/lib/base64-vlq.js +0 -140
  183. package/lib/handlers/node_modules/source-map/lib/base64.js +0 -67
  184. package/lib/handlers/node_modules/source-map/lib/binary-search.js +0 -111
  185. package/lib/handlers/node_modules/source-map/lib/mapping-list.js +0 -79
  186. package/lib/handlers/node_modules/source-map/lib/quick-sort.js +0 -114
  187. package/lib/handlers/node_modules/source-map/lib/source-map-consumer.js +0 -1145
  188. package/lib/handlers/node_modules/source-map/lib/source-map-generator.js +0 -425
  189. package/lib/handlers/node_modules/source-map/lib/source-node.js +0 -413
  190. package/lib/handlers/node_modules/source-map/lib/util.js +0 -488
  191. package/lib/handlers/node_modules/source-map/package.json +0 -73
  192. package/lib/handlers/node_modules/source-map/source-map.d.ts +0 -98
  193. package/lib/handlers/node_modules/source-map/source-map.js +0 -8
  194. package/lib/handlers/node_modules/source-map-support/LICENSE.md +0 -21
  195. package/lib/handlers/node_modules/source-map-support/README.md +0 -284
  196. package/lib/handlers/node_modules/source-map-support/browser-source-map-support.js +0 -114
  197. package/lib/handlers/node_modules/source-map-support/package.json +0 -31
  198. package/lib/handlers/node_modules/source-map-support/register.js +0 -1
  199. package/lib/handlers/node_modules/source-map-support/source-map-support.js +0 -604
  200. package/lib/handlers/package-lock.json +0 -108
  201. package/lib/handlers/package.json +0 -13
  202. package/lib/handlers/tsconfig.json +0 -22
  203. package/lib/prerender-cf-cache-control-construct.d.ts +0 -10
  204. package/lib/prerender-cf-cache-control-construct.js +0 -33
  205. package/lib/prerender-check-construct.d.ts +0 -6
  206. package/lib/prerender-check-construct.js +0 -25
  207. package/lib/prerender-construct.d.ts +0 -11
  208. package/lib/prerender-construct.js +0 -34
  209. package/lib/prerender-lambda-construct.d.ts +0 -17
  210. package/lib/prerender-lambda-construct.js +0 -19
@@ -1,61 +0,0 @@
1
- declare module 'trace_events' {
2
- /**
3
- * The `Tracing` object is used to enable or disable tracing for sets of
4
- * categories. Instances are created using the
5
- * `trace_events.createTracing()` method.
6
- *
7
- * When created, the `Tracing` object is disabled. Calling the
8
- * `tracing.enable()` method adds the categories to the set of enabled trace
9
- * event categories. Calling `tracing.disable()` will remove the categories
10
- * from the set of enabled trace event categories.
11
- */
12
- interface Tracing {
13
- /**
14
- * A comma-separated list of the trace event categories covered by this
15
- * `Tracing` object.
16
- */
17
- readonly categories: string;
18
-
19
- /**
20
- * Disables this `Tracing` object.
21
- *
22
- * Only trace event categories _not_ covered by other enabled `Tracing`
23
- * objects and _not_ specified by the `--trace-event-categories` flag
24
- * will be disabled.
25
- */
26
- disable(): void;
27
-
28
- /**
29
- * Enables this `Tracing` object for the set of categories covered by
30
- * the `Tracing` object.
31
- */
32
- enable(): void;
33
-
34
- /**
35
- * `true` only if the `Tracing` object has been enabled.
36
- */
37
- readonly enabled: boolean;
38
- }
39
-
40
- interface CreateTracingOptions {
41
- /**
42
- * An array of trace category names. Values included in the array are
43
- * coerced to a string when possible. An error will be thrown if the
44
- * value cannot be coerced.
45
- */
46
- categories: string[];
47
- }
48
-
49
- /**
50
- * Creates and returns a Tracing object for the given set of categories.
51
- */
52
- function createTracing(options: CreateTracingOptions): Tracing;
53
-
54
- /**
55
- * Returns a comma-separated list of all currently-enabled trace event
56
- * categories. The current set of enabled trace event categories is
57
- * determined by the union of all currently-enabled `Tracing` objects and
58
- * any categories enabled using the `--trace-event-categories` flag.
59
- */
60
- function getEnabledCategories(): string | undefined;
61
- }
@@ -1,98 +0,0 @@
1
- declare module 'assert' {
2
- /** An alias of `assert.ok()`. */
3
- function assert(value: any, message?: string | Error): void;
4
- namespace assert {
5
- class AssertionError extends Error {
6
- actual: any;
7
- expected: any;
8
- operator: string;
9
- generatedMessage: boolean;
10
- code: 'ERR_ASSERTION';
11
-
12
- constructor(options?: {
13
- /** If provided, the error message is set to this value. */
14
- message?: string;
15
- /** The `actual` property on the error instance. */
16
- actual?: any;
17
- /** The `expected` property on the error instance. */
18
- expected?: any;
19
- /** The `operator` property on the error instance. */
20
- operator?: string;
21
- /** If provided, the generated stack trace omits frames before this function. */
22
- // tslint:disable-next-line:ban-types
23
- stackStartFn?: Function;
24
- });
25
- }
26
-
27
- class CallTracker {
28
- calls(exact?: number): () => void;
29
- calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
30
- report(): CallTrackerReportInformation[];
31
- verify(): void;
32
- }
33
- interface CallTrackerReportInformation {
34
- message: string;
35
- /** The actual number of times the function was called. */
36
- actual: number;
37
- /** The number of times the function was expected to be called. */
38
- expected: number;
39
- /** The name of the function that is wrapped. */
40
- operator: string;
41
- /** A stack trace of the function. */
42
- stack: object;
43
- }
44
-
45
- type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
46
-
47
- function fail(message?: string | Error): never;
48
- /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
49
- function fail(
50
- actual: any,
51
- expected: any,
52
- message?: string | Error,
53
- operator?: string,
54
- // tslint:disable-next-line:ban-types
55
- stackStartFn?: Function,
56
- ): never;
57
- function ok(value: any, message?: string | Error): void;
58
- /** @deprecated since v9.9.0 - use strictEqual() instead. */
59
- function equal(actual: any, expected: any, message?: string | Error): void;
60
- /** @deprecated since v9.9.0 - use notStrictEqual() instead. */
61
- function notEqual(actual: any, expected: any, message?: string | Error): void;
62
- /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
63
- function deepEqual(actual: any, expected: any, message?: string | Error): void;
64
- /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
65
- function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
66
- function strictEqual(actual: any, expected: any, message?: string | Error): void;
67
- function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
68
- function deepStrictEqual(actual: any, expected: any, message?: string | Error): void;
69
- function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
70
-
71
- function throws(block: () => any, message?: string | Error): void;
72
- function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
73
- function doesNotThrow(block: () => any, message?: string | Error): void;
74
- function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
75
-
76
- function ifError(value: any): void;
77
-
78
- function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
79
- function rejects(
80
- block: (() => Promise<any>) | Promise<any>,
81
- error: AssertPredicate,
82
- message?: string | Error,
83
- ): Promise<void>;
84
- function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
85
- function doesNotReject(
86
- block: (() => Promise<any>) | Promise<any>,
87
- error: AssertPredicate,
88
- message?: string | Error,
89
- ): Promise<void>;
90
-
91
- function match(value: string, regExp: RegExp, message?: string | Error): void;
92
- function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
93
-
94
- const strict: typeof assert;
95
- }
96
-
97
- export = assert;
98
- }
@@ -1,68 +0,0 @@
1
- // NOTE: These definitions support NodeJS and TypeScript 3.6 and earlier.
2
-
3
- // NOTE: TypeScript version-specific augmentations can be found in the following paths:
4
- // - ~/base.d.ts - Shared definitions common to all TypeScript versions
5
- // - ~/index.d.ts - Definitions specific to TypeScript 3.7 and above
6
- // - ~/ts3.6/base.d.ts - Definitions specific to TypeScript 3.6 and earlier
7
- // - ~/ts3.6/index.d.ts - Definitions specific to TypeScript 3.6 and earlier with assert pulled in
8
-
9
- // Reference required types from the default lib:
10
- /// <reference lib="es2018" />
11
- /// <reference lib="esnext.asynciterable" />
12
- /// <reference lib="esnext.intl" />
13
- /// <reference lib="esnext.bigint" />
14
-
15
- // Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
16
- /// <reference path="../assert/strict.d.ts" />
17
- /// <reference path="../globals.d.ts" />
18
- /// <reference path="../async_hooks.d.ts" />
19
- /// <reference path="../buffer.d.ts" />
20
- /// <reference path="../child_process.d.ts" />
21
- /// <reference path="../cluster.d.ts" />
22
- /// <reference path="../console.d.ts" />
23
- /// <reference path="../constants.d.ts" />
24
- /// <reference path="../crypto.d.ts" />
25
- /// <reference path="../dgram.d.ts" />
26
- /// <reference path="../diagnostic_channel.d.ts" />
27
- /// <reference path="../dns.d.ts" />
28
- /// <reference path="../dns/promises.d.ts" />
29
- /// <reference path="../dns/promises.d.ts" />
30
- /// <reference path="../domain.d.ts" />
31
- /// <reference path="../events.d.ts" />
32
- /// <reference path="../fs.d.ts" />
33
- /// <reference path="../fs/promises.d.ts" />
34
- /// <reference path="../http.d.ts" />
35
- /// <reference path="../http2.d.ts" />
36
- /// <reference path="../https.d.ts" />
37
- /// <reference path="../inspector.d.ts" />
38
- /// <reference path="../module.d.ts" />
39
- /// <reference path="../net.d.ts" />
40
- /// <reference path="../os.d.ts" />
41
- /// <reference path="../path.d.ts" />
42
- /// <reference path="../perf_hooks.d.ts" />
43
- /// <reference path="../process.d.ts" />
44
- /// <reference path="../punycode.d.ts" />
45
- /// <reference path="../querystring.d.ts" />
46
- /// <reference path="../readline.d.ts" />
47
- /// <reference path="../repl.d.ts" />
48
- /// <reference path="../stream.d.ts" />
49
- /// <reference path="../stream/promises.d.ts" />
50
- /// <reference path="../string_decoder.d.ts" />
51
- /// <reference path="../timers.d.ts" />
52
- /// <reference path="../timers/promises.d.ts" />
53
- /// <reference path="../tls.d.ts" />
54
- /// <reference path="../trace_events.d.ts" />
55
- /// <reference path="../tty.d.ts" />
56
- /// <reference path="../url.d.ts" />
57
- /// <reference path="../util.d.ts" />
58
- /// <reference path="../util/types.d.ts" />
59
- /// <reference path="../v8.d.ts" />
60
- /// <reference path="../vm.d.ts" />
61
- /// <reference path="../worker_threads.d.ts" />
62
- /// <reference path="../zlib.d.ts" />
63
-
64
- // TypeScript 3.6-specific augmentations:
65
- /// <reference path="../globals.global.d.ts" />
66
-
67
- // TypeScript 3.6-specific augmentations:
68
- /// <reference path="../wasi.d.ts" />
@@ -1,7 +0,0 @@
1
- // NOTE: These definitions support NodeJS and TypeScript 3.6.
2
- // This is required to enable typing assert in ts3.7 without causing errors
3
- // Typically type modifications should be made in base.d.ts instead of here
4
-
5
- /// <reference path="base.d.ts" />
6
-
7
- /// <reference path="assert.d.ts" />
@@ -1,66 +0,0 @@
1
- declare module 'tty' {
2
- import * as net from 'net';
3
-
4
- function isatty(fd: number): boolean;
5
- class ReadStream extends net.Socket {
6
- constructor(fd: number, options?: net.SocketConstructorOpts);
7
- isRaw: boolean;
8
- setRawMode(mode: boolean): this;
9
- isTTY: boolean;
10
- }
11
- /**
12
- * -1 - to the left from cursor
13
- * 0 - the entire line
14
- * 1 - to the right from cursor
15
- */
16
- type Direction = -1 | 0 | 1;
17
- class WriteStream extends net.Socket {
18
- constructor(fd: number);
19
- addListener(event: string, listener: (...args: any[]) => void): this;
20
- addListener(event: "resize", listener: () => void): this;
21
-
22
- emit(event: string | symbol, ...args: any[]): boolean;
23
- emit(event: "resize"): boolean;
24
-
25
- on(event: string, listener: (...args: any[]) => void): this;
26
- on(event: "resize", listener: () => void): this;
27
-
28
- once(event: string, listener: (...args: any[]) => void): this;
29
- once(event: "resize", listener: () => void): this;
30
-
31
- prependListener(event: string, listener: (...args: any[]) => void): this;
32
- prependListener(event: "resize", listener: () => void): this;
33
-
34
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
35
- prependOnceListener(event: "resize", listener: () => void): this;
36
-
37
- /**
38
- * Clears the current line of this WriteStream in a direction identified by `dir`.
39
- */
40
- clearLine(dir: Direction, callback?: () => void): boolean;
41
- /**
42
- * Clears this `WriteStream` from the current cursor down.
43
- */
44
- clearScreenDown(callback?: () => void): boolean;
45
- /**
46
- * Moves this WriteStream's cursor to the specified position.
47
- */
48
- cursorTo(x: number, y?: number, callback?: () => void): boolean;
49
- cursorTo(x: number, callback: () => void): boolean;
50
- /**
51
- * Moves this WriteStream's cursor relative to its current position.
52
- */
53
- moveCursor(dx: number, dy: number, callback?: () => void): boolean;
54
- /**
55
- * @default `process.env`
56
- */
57
- getColorDepth(env?: {}): number;
58
- hasColors(depth?: number): boolean;
59
- hasColors(env?: {}): boolean;
60
- hasColors(depth: number, env?: {}): boolean;
61
- getWindowSize(): [number, number];
62
- columns: number;
63
- rows: number;
64
- isTTY: boolean;
65
- }
66
- }
@@ -1,116 +0,0 @@
1
- declare module 'url' {
2
- import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring';
3
-
4
- // Input to `url.format`
5
- interface UrlObject {
6
- auth?: string | null;
7
- hash?: string | null;
8
- host?: string | null;
9
- hostname?: string | null;
10
- href?: string | null;
11
- pathname?: string | null;
12
- protocol?: string | null;
13
- search?: string | null;
14
- slashes?: boolean | null;
15
- port?: string | number | null;
16
- query?: string | null | ParsedUrlQueryInput;
17
- }
18
-
19
- // Output of `url.parse`
20
- interface Url {
21
- auth: string | null;
22
- hash: string | null;
23
- host: string | null;
24
- hostname: string | null;
25
- href: string;
26
- path: string | null;
27
- pathname: string | null;
28
- protocol: string | null;
29
- search: string | null;
30
- slashes: boolean | null;
31
- port: string | null;
32
- query: string | null | ParsedUrlQuery;
33
- }
34
-
35
- interface UrlWithParsedQuery extends Url {
36
- query: ParsedUrlQuery;
37
- }
38
-
39
- interface UrlWithStringQuery extends Url {
40
- query: string | null;
41
- }
42
-
43
- /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
44
- function parse(urlStr: string): UrlWithStringQuery;
45
- /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
46
- function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
47
- /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
48
- function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
49
- /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
50
- function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
51
-
52
- function format(URL: URL, options?: URLFormatOptions): string;
53
- /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
54
- function format(urlObject: UrlObject | string): string;
55
- /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
56
- function resolve(from: string, to: string): string;
57
-
58
- function domainToASCII(domain: string): string;
59
- function domainToUnicode(domain: string): string;
60
-
61
- /**
62
- * This function ensures the correct decodings of percent-encoded characters as
63
- * well as ensuring a cross-platform valid absolute path string.
64
- * @param url The file URL string or URL object to convert to a path.
65
- */
66
- function fileURLToPath(url: string | URL): string;
67
-
68
- /**
69
- * This function ensures that path is resolved absolutely, and that the URL
70
- * control characters are correctly encoded when converting into a File URL.
71
- * @param url The path to convert to a File URL.
72
- */
73
- function pathToFileURL(url: string): URL;
74
-
75
- interface URLFormatOptions {
76
- auth?: boolean;
77
- fragment?: boolean;
78
- search?: boolean;
79
- unicode?: boolean;
80
- }
81
-
82
- class URL {
83
- constructor(input: string, base?: string | URL);
84
- hash: string;
85
- host: string;
86
- hostname: string;
87
- href: string;
88
- readonly origin: string;
89
- password: string;
90
- pathname: string;
91
- port: string;
92
- protocol: string;
93
- search: string;
94
- readonly searchParams: URLSearchParams;
95
- username: string;
96
- toString(): string;
97
- toJSON(): string;
98
- }
99
-
100
- class URLSearchParams implements Iterable<[string, string]> {
101
- constructor(init?: URLSearchParams | string | NodeJS.Dict<string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
102
- append(name: string, value: string): void;
103
- delete(name: string): void;
104
- entries(): IterableIterator<[string, string]>;
105
- forEach(callback: (value: string, name: string, searchParams: this) => void): void;
106
- get(name: string): string | null;
107
- getAll(name: string): string[];
108
- has(name: string): boolean;
109
- keys(): IterableIterator<string>;
110
- set(name: string, value: string): void;
111
- sort(): void;
112
- toString(): string;
113
- values(): IterableIterator<string>;
114
- [Symbol.iterator](): IterableIterator<[string, string]>;
115
- }
116
- }
@@ -1,53 +0,0 @@
1
- declare module 'util/types' {
2
- function isAnyArrayBuffer(object: any): object is ArrayBufferLike;
3
- function isArgumentsObject(object: any): object is IArguments;
4
- function isArrayBuffer(object: any): object is ArrayBuffer;
5
- function isArrayBufferView(object: any): object is NodeJS.ArrayBufferView;
6
- function isAsyncFunction(object: any): boolean;
7
- function isBigInt64Array(value: any): value is BigInt64Array;
8
- function isBigUint64Array(value: any): value is BigUint64Array;
9
- function isBooleanObject(object: any): object is Boolean;
10
- function isBoxedPrimitive(object: any): object is String | Number | BigInt | Boolean | Symbol;
11
- function isDataView(object: any): object is DataView;
12
- function isDate(object: any): object is Date;
13
- function isExternal(object: any): boolean;
14
- function isFloat32Array(object: any): object is Float32Array;
15
- function isFloat64Array(object: any): object is Float64Array;
16
- function isGeneratorFunction(object: any): object is GeneratorFunction;
17
- function isGeneratorObject(object: any): object is Generator;
18
- function isInt8Array(object: any): object is Int8Array;
19
- function isInt16Array(object: any): object is Int16Array;
20
- function isInt32Array(object: any): object is Int32Array;
21
- function isMap<T>(
22
- object: T | {},
23
- ): object is T extends ReadonlyMap<any, any>
24
- ? unknown extends T
25
- ? never
26
- : ReadonlyMap<any, any>
27
- : Map<any, any>;
28
- function isMapIterator(object: any): boolean;
29
- function isModuleNamespaceObject(value: any): boolean;
30
- function isNativeError(object: any): object is Error;
31
- function isNumberObject(object: any): object is Number;
32
- function isPromise(object: any): object is Promise<any>;
33
- function isProxy(object: any): boolean;
34
- function isRegExp(object: any): object is RegExp;
35
- function isSet<T>(
36
- object: T | {},
37
- ): object is T extends ReadonlySet<any>
38
- ? unknown extends T
39
- ? never
40
- : ReadonlySet<any>
41
- : Set<any>;
42
- function isSetIterator(object: any): boolean;
43
- function isSharedArrayBuffer(object: any): object is SharedArrayBuffer;
44
- function isStringObject(object: any): object is String;
45
- function isSymbolObject(object: any): object is Symbol;
46
- function isTypedArray(object: any): object is NodeJS.TypedArray;
47
- function isUint8Array(object: any): object is Uint8Array;
48
- function isUint8ClampedArray(object: any): object is Uint8ClampedArray;
49
- function isUint16Array(object: any): object is Uint16Array;
50
- function isUint32Array(object: any): object is Uint32Array;
51
- function isWeakMap(object: any): object is WeakMap<any, any>;
52
- function isWeakSet(object: any): object is WeakSet<any>;
53
- }
@@ -1,156 +0,0 @@
1
- declare module 'util' {
2
- import * as types from 'util/types';
3
-
4
- export interface InspectOptions extends NodeJS.InspectOptions { }
5
- export type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
6
- export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string;
7
- export interface InspectOptionsStylized extends InspectOptions {
8
- stylize(text: string, styleType: Style): string;
9
- }
10
- export function format(format?: any, ...param: any[]): string;
11
- export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
12
- /** @deprecated since v0.11.3 - use a third party module instead. */
13
- export function log(string: string): void;
14
- export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
15
- export function inspect(object: any, options: InspectOptions): string;
16
- export namespace inspect {
17
- let colors: NodeJS.Dict<[number, number]>;
18
- let styles: {
19
- [K in Style]: string
20
- };
21
- let defaultOptions: InspectOptions;
22
- /**
23
- * Allows changing inspect settings from the repl.
24
- */
25
- let replDefaults: InspectOptions;
26
- const custom: unique symbol;
27
- }
28
- /** @deprecated since v4.0.0 - use `Array.isArray()` instead. */
29
- export function isArray(object: any): object is any[];
30
- /** @deprecated since v4.0.0 - use `util.types.isRegExp()` instead. */
31
- export function isRegExp(object: any): object is RegExp;
32
- /** @deprecated since v4.0.0 - use `util.types.isDate()` instead. */
33
- export function isDate(object: any): object is Date;
34
- /** @deprecated since v4.0.0 - use `util.types.isNativeError()` instead. */
35
- export function isError(object: any): object is Error;
36
- export function inherits(constructor: any, superConstructor: any): void;
37
- export function debuglog(key: string): (msg: string, ...param: any[]) => void;
38
- /** @deprecated since v4.0.0 - use `typeof value === 'boolean'` instead. */
39
- export function isBoolean(object: any): object is boolean;
40
- /** @deprecated since v4.0.0 - use `Buffer.isBuffer()` instead. */
41
- export function isBuffer(object: any): object is Buffer;
42
- /** @deprecated since v4.0.0 - use `typeof value === 'function'` instead. */
43
- export function isFunction(object: any): boolean;
44
- /** @deprecated since v4.0.0 - use `value === null` instead. */
45
- export function isNull(object: any): object is null;
46
- /** @deprecated since v4.0.0 - use `value === null || value === undefined` instead. */
47
- export function isNullOrUndefined(object: any): object is null | undefined;
48
- /** @deprecated since v4.0.0 - use `typeof value === 'number'` instead. */
49
- export function isNumber(object: any): object is number;
50
- /** @deprecated since v4.0.0 - use `value !== null && typeof value === 'object'` instead. */
51
- export function isObject(object: any): boolean;
52
- /** @deprecated since v4.0.0 - use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. */
53
- export function isPrimitive(object: any): boolean;
54
- /** @deprecated since v4.0.0 - use `typeof value === 'string'` instead. */
55
- export function isString(object: any): object is string;
56
- /** @deprecated since v4.0.0 - use `typeof value === 'symbol'` instead. */
57
- export function isSymbol(object: any): object is symbol;
58
- /** @deprecated since v4.0.0 - use `value === undefined` instead. */
59
- export function isUndefined(object: any): object is undefined;
60
- export function deprecate<T extends Function>(fn: T, message: string, code?: string): T;
61
- export function isDeepStrictEqual(val1: any, val2: any): boolean;
62
-
63
- export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
64
- export function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
65
- export function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
66
- export function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
67
- export function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
68
- export function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
69
- export function callbackify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
70
- export function callbackify<T1, T2, T3, TResult>(
71
- fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
72
- export function callbackify<T1, T2, T3, T4>(
73
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
74
- export function callbackify<T1, T2, T3, T4, TResult>(
75
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
76
- export function callbackify<T1, T2, T3, T4, T5>(
77
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
78
- export function callbackify<T1, T2, T3, T4, T5, TResult>(
79
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
80
- ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
81
- export function callbackify<T1, T2, T3, T4, T5, T6>(
82
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>,
83
- ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
84
- export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
85
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
86
- ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
87
-
88
- export interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
89
- __promisify__: TCustom;
90
- }
91
-
92
- export interface CustomPromisifySymbol<TCustom extends Function> extends Function {
93
- [promisify.custom]: TCustom;
94
- }
95
-
96
- export type CustomPromisify<TCustom extends Function> = CustomPromisifySymbol<TCustom> | CustomPromisifyLegacy<TCustom>;
97
-
98
- export function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
99
- export function promisify<TResult>(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise<TResult>;
100
- export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
101
- export function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
102
- export function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
103
- export function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
104
- export function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
105
- export function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void):
106
- (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
107
- export function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
108
- export function promisify<T1, T2, T3, T4, TResult>(
109
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void,
110
- ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
111
- export function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void):
112
- (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
113
- export function promisify<T1, T2, T3, T4, T5, TResult>(
114
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void,
115
- ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
116
- export function promisify<T1, T2, T3, T4, T5>(
117
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void,
118
- ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
119
- export function promisify(fn: Function): Function;
120
- export namespace promisify {
121
- const custom: unique symbol;
122
- }
123
- export class TextDecoder {
124
- readonly encoding: string;
125
- readonly fatal: boolean;
126
- readonly ignoreBOM: boolean;
127
- constructor(
128
- encoding?: string,
129
- options?: { fatal?: boolean; ignoreBOM?: boolean }
130
- );
131
- decode(
132
- input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
133
- options?: { stream?: boolean }
134
- ): string;
135
- }
136
-
137
- export interface EncodeIntoResult {
138
- /**
139
- * The read Unicode code units of input.
140
- */
141
-
142
- read: number;
143
- /**
144
- * The written UTF-8 bytes of output.
145
- */
146
- written: number;
147
- }
148
-
149
- export { types };
150
-
151
- export class TextEncoder {
152
- readonly encoding: string;
153
- encode(input?: string): Uint8Array;
154
- encodeInto(input: string, output: Uint8Array): EncodeIntoResult;
155
- }
156
- }