UNPKG

maketypes

Version:

Make TypeScript types and proxy objects from example JSON objects. Can use proxy objects to dynamically type check JSON at runtime.

12 lines (11 loc) 315 B
import Writer from './writer'; /** * Calls callbacks when written to. */ export default class CallbackWriter extends Writer { private readonly _writeCb; private readonly _endCb; constructor(writeCb: (s: string) => any, endCb: () => any); write(s: string): this; close(cb: () => void): void; }