| | |
| | | * ```js |
| | | * const v8 = require('v8'); |
| | | * ``` |
| | | * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/v8.js) |
| | | * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/v8.js) |
| | | */ |
| | | declare module 'v8' { |
| | | import { Readable } from 'node:stream'; |
| | |
| | | * |
| | | * When the process is about to exit, one last coverage will still be written to |
| | | * disk unless {@link stopCoverage} is invoked before the process exits. |
| | | * @since v15.1.0, v12.22.0 |
| | | * @since v15.1.0, v14.18.0, v12.22.0 |
| | | */ |
| | | function takeCoverage(): void; |
| | | /** |
| | | * The `v8.stopCoverage()` method allows the user to stop the coverage collection |
| | | * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count |
| | | * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand. |
| | | * @since v15.1.0, v12.22.0 |
| | | * @since v15.1.0, v14.18.0, v12.22.0 |
| | | */ |
| | | function stopCoverage(): void; |
| | | } |