DefinitelyTyped/types/html5-to-pdf/html5-to-pdf-tests.ts
Sam Alexander 803703a51f Add types for html5-to-pdf (#34288)
* Add types for html5-to-pdf

* Add typescript version

* Update tsconfig

* Fix lint errors

* Fix tests
2019-03-29 00:37:43 -07:00

10 lines
424 B
TypeScript

import * as HTML5ToPDF from "html5-to-pdf";
const options = { inputBody: "<html><body>Hello World</body></html>" };
const converter = new HTML5ToPDF(options);
converter.parseOptions(options); // $ExpectType ParsedOptions
converter.build(); // $ExpectType Promise<Buffer>
converter.includeAssets(); // $ExpectType Promise<void>
converter.start(); // $ExpectType Promise<Page>
converter.close(); // $ExpectType Promise<void>