mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
* Fix markdown-pdf to.buffer type * Update test * Prettier Fixes * Fix tests after prettier formatting changes
39 lines
859 B
TypeScript
39 lines
859 B
TypeScript
import mdPdf = require('markdown-pdf');
|
|
|
|
// $ExpectType void
|
|
mdPdf()
|
|
.from('path')
|
|
.to('path', () => {});
|
|
// $ExpectType void
|
|
mdPdf()
|
|
.from.string('markdown')
|
|
.to('path', () => {});
|
|
// $ExpectType void
|
|
mdPdf({ paperOrientation: 'landscape', paperFormat: 'A3' })
|
|
.from('lol')
|
|
.to('lol', () => {});
|
|
// $ExpectType void
|
|
mdPdf()
|
|
.concat.from.paths(['lol', 'lol'], {})
|
|
.to('path', () => {});
|
|
// $ExpectType void
|
|
mdPdf()
|
|
.concat.from.strings(['lol', 'lol'], {})
|
|
.to('path', () => {});
|
|
// $ExpectType void
|
|
mdPdf()
|
|
.from('path')
|
|
.to.path('path', () => {});
|
|
// $ExpectType void
|
|
mdPdf().from('path').to('path');
|
|
|
|
// $ExpectType void
|
|
mdPdf()
|
|
.from.string('markdown')
|
|
.to.buffer(null, (err, buffer) => {
|
|
buffer; // $ExpectType ArrayBuffer
|
|
});
|
|
|
|
// @ts-expect-error
|
|
mdPdf({ paperFormat: 'wrongFormat' });
|