Closed vlsi closed 4 years ago
I guess here's the definition: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/5e1fd7eaf08eba32531f4fb9f0d9f147d6fef9aa/types/readable-stream/index.d.ts#L246-L251
type WritableOptions = WritableStateOptions & {
write?(this: Writable, chunk: any, encoding: BufferEncoding | string, callback: (error?: Error | null) => void): void;
writev?(this: Writable, chunk: ArrayLike<{ chunk: any; encoding: BufferEncoding | string }>, callback: (error?: Error | null) => void): void;
destroy?(this: Writable, error: Error | null, callback: (error: Error | null) => void): void;
final?(this: Writable, callback: (error?: Error | null) => void): void;
};
and
type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex";