@types/node 12.6.0 → 12.6.4

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 (5) hide show
  1. node/README.md +1 -1
  2. node/buffer.d.ts +6 -0
  3. node/globals.d.ts +5 -0
  4. node/package.json +2 -2
  5. node/vm.d.ts +32 -1
node/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (http://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
9
9
 
10
10
  Additional Details
11
- * Last updated: Mon, 08 Jul 2019 16:47:58 GMT
11
+ * Last updated: Tue, 16 Jul 2019 17:19:16 GMT
12
12
  * Dependencies: none
13
13
  * Global values: Buffer, NodeJS, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, queueMicrotask, require, setImmediate, setInterval, setTimeout
14
14
 
node/buffer.d.ts CHANGED
@@ -1,5 +1,11 @@
1
1
  declare module "buffer" {
2
2
  export const INSPECT_MAX_BYTES: number;
3
+ export const kMaxLength: number;
4
+ export const kStringMaxLength: number;
5
+ export const constants: {
6
+ MAX_LENGTH: number;
7
+ MAX_STRING_LENGTH: number;
8
+ };
3
9
  const BuffType: typeof Buffer;
4
10
 
5
11
  export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
node/globals.d.ts CHANGED
@@ -154,6 +154,10 @@ interface String {
154
154
  trimRight(): string;
155
155
  }
156
156
 
157
+ interface ImportMeta {
158
+ url: string;
159
+ }
160
+
157
161
  /*-----------------------------------------------*
158
162
  * *
159
163
  * GLOBAL *
@@ -725,6 +729,7 @@ declare namespace NodeJS {
725
729
  }
726
730
 
727
731
  interface WriteStream extends Socket {
732
+ readonly writableFinished: boolean;
728
733
  readonly writableHighWaterMark: number;
729
734
  readonly writableLength: number;
730
735
  columns?: number;
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "12.6.0",
3
+ "version": "12.6.4",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -206,6 +206,6 @@
206
206
  },
207
207
  "scripts": {},
208
208
  "dependencies": {},
209
- "typesPublisherContentHash": "4bbb4b5a36bb2ff2bf5698773b73aeb277b84a73978f74fe8875dbb333a604ba",
209
+ "typesPublisherContentHash": "55e1dd2b48fbe58beb147b8157e825fd0074b7568f51f551ca1c7ada156dc083",
210
210
  "typeScriptVersion": "2.0"
211
211
  }
node/vm.d.ts CHANGED
@@ -49,13 +49,44 @@ declare module "vm" {
49
49
  */
50
50
  contextExtensions?: Object[];
51
51
  }
52
+
53
+ interface CreateContextOptions {
54
+ /**
55
+ * Human-readable name of the newly created context.
56
+ * @default 'VM Context i' Where i is an ascending numerical index of the created context.
57
+ */
58
+ name?: string;
59
+ /**
60
+ * Corresponds to the newly created context for display purposes.
61
+ * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary),
62
+ * like the value of the `url.origin` property of a URL object.
63
+ * Most notably, this string should omit the trailing slash, as that denotes a path.
64
+ * @default ''
65
+ */
66
+ origin?: string;
67
+ codeGeneration?: {
68
+ /**
69
+ * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
70
+ * will throw an EvalError.
71
+ * @default true
72
+ */
73
+ strings?: boolean;
74
+ /**
75
+ * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
76
+ * @default true
77
+ */
78
+ wasm?: boolean;
79
+ };
80
+ }
81
+
52
82
  class Script {
53
83
  constructor(code: string, options?: ScriptOptions);
54
84
  runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any;
55
85
  runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
56
86
  runInThisContext(options?: RunningScriptOptions): any;
87
+ createCachedData(): Buffer;
57
88
  }
58
- function createContext(sandbox?: Context): Context;
89
+ function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
59
90
  function isContext(sandbox: Context): boolean;
60
91
  function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any;
61
92
  function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any;