Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/// <reference path="JSONStream.d.ts" /> | ||
|
||
import json = require('JSONStream'); | ||
|
||
var read: NodeJS.ReadableStream; | ||
var write: NodeJS.WritableStream; | ||
|
||
read = read.pipe(json.parse('*')); | ||
read = read.pipe(json.parse(['foo/*', 'bar/*'])); | ||
|
||
read = json.stringify(); | ||
read = json.stringify('{', ',', '}'); | ||
|
||
read = json.stringifyObject(); | ||
read = json.stringifyObject('{', ',', '}'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Type definitions for JSONStream v0.8.0 | ||
// Project: http://github.com/dominictarr/JSONStream | ||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds> | ||
// Definitions: https://github.com/borisyankov/DefinitelyTyped | ||
|
||
/// <reference path="../node/node.d.ts" /> | ||
|
||
declare module 'JSONStream' { | ||
|
||
export interface Options { | ||
recurse: boolean; | ||
} | ||
|
||
export function parse(pattern: any): NodeJS.ReadWriteStream; | ||
export function parse(patterns: any[]): NodeJS.ReadWriteStream; | ||
|
||
export function stringify(): NodeJS.ReadWriteStream; | ||
export function stringify(open: string, sep: string, close: string): NodeJS.ReadWriteStream; | ||
|
||
export function stringifyObject(): NodeJS.ReadWriteStream; | ||
export function stringifyObject(open: string, sep: string, close: string): NodeJS.ReadWriteStream; | ||
} |