mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Move all packages to a types directory
This commit is contained in:
9
types/batch-stream/batch-stream-tests.ts
Normal file
9
types/batch-stream/batch-stream-tests.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import fs = require('fs');
|
||||
import BatchStream = require('batch-stream');
|
||||
|
||||
var batch = new BatchStream({ size : 5 });
|
||||
var stream = fs.createReadStream('/etc/passwd');
|
||||
|
||||
stream
|
||||
.pipe(batch)
|
||||
.pipe(fs.createWriteStream('./test.out')); // deals with array input from pipe.
|
||||
23
types/batch-stream/index.d.ts
vendored
Normal file
23
types/batch-stream/index.d.ts
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
// Type definitions for batch-stream 0.1.2
|
||||
// Project: https://github.com/segmentio/batch-stream
|
||||
// Definitions by: Nicholas Penree <http://github.com/drudge>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
|
||||
import stream = require('stream');
|
||||
|
||||
interface Options {
|
||||
size?: number;
|
||||
highWaterMark?: number;
|
||||
}
|
||||
|
||||
declare class BatchStream extends stream.Transform {
|
||||
size: number;
|
||||
batch: any[];
|
||||
|
||||
constructor(options: Options);
|
||||
}
|
||||
|
||||
export = BatchStream;
|
||||
22
types/batch-stream/tsconfig.json
Normal file
22
types/batch-stream/tsconfig.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"batch-stream-tests.ts"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user