@types/jsonstream-next
TypeScript icon, indicating that this package has built-in type declarations

3.0.3 • Public • Published

Installation

npm install --save @types/jsonstream-next

Summary

This package contains type definitions for jsonstream-next (https://github.com/dominictarr/JSONStream).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsonstream-next.

index.d.ts

/// <reference types="node" />

import stream = require("stream");

export interface Options {
    recurse: boolean;
}

export function parse(pattern: any): stream.Transform;
export function parse(patterns: any[]): stream.Transform;

/**
 * Create a writable stream.
 * You may pass in custom open, close, and seperator strings, but, by default,
 * JSONStream.stringify() will create an array,
 * (with default options open='[\n', sep='\n,\n', close='\n]\n')
 */
export function stringify(): stream.Transform;

/**
 * Create a writable stream.
 * You may pass in custom open, close, and seperator strings.
 */
export function stringify(open: string, sep: string, close: string): stream.Transform;

/** Creates a writable stream where elements are only seperated by a newline. */
export function stringify(newlineOnly: NewlineOnlyIndicator): stream.Transform;
export type NewlineOnlyIndicator = false;

export function stringifyObject(): stream.Transform;
export function stringifyObject(open: string, sep: string, close: string): stream.Transform;
export function stringifyObject(newlineOnly: NewlineOnlyIndicator): stream.Transform;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Daniel Rosenwasser.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/jsonstream-next

Weekly Downloads

565

Version

3.0.3

License

MIT

Unpacked Size

4.97 kB

Total Files

5

Last publish

Collaborators

  • types