streamsaver.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. declare module '@yume-chan/stream-saver' {
  2. type OriginalWriteableStream = typeof WritableStream;
  3. namespace StreamSaver {
  4. export interface Options<W = any> {
  5. size?: number;
  6. pathname?: string;
  7. writableStrategy?: QueuingStrategy<W>;
  8. readableStrategy?: QueuingStrategy<W>;
  9. }
  10. export function createWriteStream<W = any>(
  11. filename: string,
  12. options?: Options<W>
  13. ): WritableStream<W>;
  14. /** @deprecated */
  15. export function createWriteStream<W = any>(
  16. filename: string,
  17. size?: number,
  18. strategy?: QueuingStrategy<W>
  19. ): WritableStream<W>;
  20. /** @deprecated */
  21. export function createWriteStream<W = any>(
  22. filename: string,
  23. strategy?: QueuingStrategy<W>
  24. ): WritableStream<W>;
  25. export const WritableStream: OriginalWriteableStream;
  26. export const supported: true;
  27. export const version: { full: string; major: number, minor: number, dot: number; };
  28. export let mitm: string;
  29. }
  30. export = StreamSaver;
  31. }