DefinitelyTyped/types/destroy/destroy-tests.ts
James Judd 806c044994
node: add std* file descriptors constants (#46034)
* node: add file descriptors

* adjust types from other modules
2020-07-13 02:00:30 -07:00

10 lines
225 B
TypeScript

import destroy = require('destroy');
import * as fs from 'fs';
const stream = fs.createReadStream('package.json');
// $ExpectType ReadStream
destroy(stream);
// $ExpectType WriteStream & { fd: 2; }
destroy(process.stderr);