main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
1.5 KB
|
Rev | Line | |
---|
[79a0317] | 1 | declare module '@discoveryjs/json-ext' {
|
---|
| 2 | type Chunk = string | Uint8Array | Buffer;
|
---|
| 3 | type Replacer =
|
---|
| 4 | | ((this: any, key: string, value: any) => any)
|
---|
| 5 | | (string | number)[]
|
---|
| 6 | | null;
|
---|
| 7 | type Space = string | number | null;
|
---|
| 8 | type StringifyOptions = {
|
---|
| 9 | replacer?: Replacer;
|
---|
| 10 | space?: Space;
|
---|
| 11 | highWaterMark?: number;
|
---|
| 12 | };
|
---|
| 13 | type StringifyInfoOptions = {
|
---|
| 14 | replacer?: Replacer;
|
---|
| 15 | space?: Space;
|
---|
| 16 | continueOnCircular?: boolean;
|
---|
| 17 | }
|
---|
| 18 | type StringifyInfoResult = {
|
---|
| 19 | bytes: number;
|
---|
| 20 | spaceBytes: number;
|
---|
| 21 | circular: object[];
|
---|
| 22 | };
|
---|
| 23 |
|
---|
| 24 | export function parseChunked(input: Iterable<Chunk> | AsyncIterable<Chunk>): Promise<any>;
|
---|
| 25 | export function parseChunked(input: () => (Iterable<Chunk> | AsyncIterable<Chunk>)): Promise<any>;
|
---|
| 26 |
|
---|
| 27 | export function stringifyChunked(value: any, replacer?: Replacer, space?: Space): Generator<string>;
|
---|
| 28 | export function stringifyChunked(value: any, options: StringifyOptions): Generator<string>;
|
---|
| 29 |
|
---|
| 30 | export function stringifyInfo(value: any, replacer?: Replacer, space?: Space): StringifyInfoResult;
|
---|
| 31 | export function stringifyInfo(value: any, options?: StringifyInfoOptions): StringifyInfoResult;
|
---|
| 32 |
|
---|
| 33 | // Web streams
|
---|
| 34 | export function parseFromWebStream(stream: ReadableStream<Chunk>): Promise<any>;
|
---|
| 35 | export function createStringifyWebStream(value: any, replacer?: Replacer, space?: Space): ReadableStream<string>;
|
---|
| 36 | export function createStringifyWebStream(value: any, options: StringifyOptions): ReadableStream<string>;
|
---|
| 37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.