mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 08:17:05 +00:00
* downloadjs types added * downloadjs inline types, remove unnecessary toString
13 lines
443 B
TypeScript
13 lines
443 B
TypeScript
import * as download from 'downloadjs';
|
|
|
|
download('hello world', 'dlText.txt', 'text/plain');
|
|
download('data:text/plain,hello%20world', 'dlDataUrlText.txt', 'text/plain');
|
|
|
|
download(new Blob(['hello world']), 'dlTextBlob.txt', 'text/plain');
|
|
|
|
download('/robots.txt');
|
|
|
|
download(document.documentElement.outerHTML, 'dlHTML.html', 'text/html');
|
|
download(new Blob(['hello world'.bold()]), 'dlHtmlBlob.html', 'text/html');
|
|
download('/diff6.png');
|