mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #14196 from nycdotnet/master
Revise Node.js definition to respond to feedback on PR #13877
This commit is contained in:
Vendored
+2
-4
@@ -4016,10 +4016,8 @@ declare module "v8" {
|
||||
physical_space_size: number;
|
||||
}
|
||||
|
||||
enum DoesZapCodeSpaceFlag {
|
||||
Disabled = 0,
|
||||
Enabled = 1
|
||||
}
|
||||
//** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */
|
||||
type DoesZapCodeSpaceFlag = 0 | 1;
|
||||
|
||||
interface HeapInfo {
|
||||
total_heap_size: number;
|
||||
|
||||
@@ -24,6 +24,7 @@ import * as string_decoder from "string_decoder";
|
||||
import * as stream from "stream";
|
||||
import * as timers from "timers";
|
||||
import * as repl from "repl";
|
||||
import * as v8 from "v8";
|
||||
|
||||
// Specifically test buffer module regression.
|
||||
import {Buffer as ImportedBuffer, SlowBuffer as ImportedSlowBuffer} from "buffer";
|
||||
@@ -2071,6 +2072,21 @@ namespace constants_tests {
|
||||
str = constants.defaultCipherList
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
/// v8 tests : https://nodejs.org/api/v8.html
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
namespace v8_tests {
|
||||
|
||||
const heapStats = v8.getHeapStatistics();
|
||||
const heapSpaceStats = v8.getHeapSpaceStatistics();
|
||||
|
||||
const zapsGarbage: number = heapStats.does_zap_garbage;
|
||||
|
||||
v8.setFlagsFromString('--collect_maps');
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
/// Debugger Tests ///
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user