Skip to main content

FileSaver

Offers a file for the person to keep, as a download. Nothing is sent anywhere: the browser builds the file from the text it is given. Never throws.

This is an interface exported by @mapcairn/core, checked against version 0.2.0.

Signature​

import type { FileSaver } from "@mapcairn/core";

interface FileSaver

Methods​

save​

save(file: SavedFile): Promise<FileSaveResult>;

Offers the file as a download. It resolves to a result and never rejects.

  • file (SavedFile)

See also​

Source: packages/core/src/ports/files.ts:23