mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Merge pull request #29177 from taoqf/master
Add declarations for `jsreport-html-embedded-in-docx`
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
// Type definitions for jsreport-html-embedded-in-docx 1.0
|
||||
// Project: https://github.com/jsreport/jsreport-html-embedded-in-docx
|
||||
// Definitions by: taoqf <https://github.com/taoqf>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import { ExtensionDefinition } from 'jsreport-core';
|
||||
|
||||
declare module 'jsreport-core' {
|
||||
interface Template {
|
||||
recipe: 'html-embedded-in-docx' | string;
|
||||
}
|
||||
}
|
||||
|
||||
declare function JsReportHtmlEmbeddedInDocx(): ExtensionDefinition;
|
||||
|
||||
export = JsReportHtmlEmbeddedInDocx;
|
||||
@@ -0,0 +1,17 @@
|
||||
import JsReport = require('jsreport-core');
|
||||
import JsreportHtml2docx = require('jsreport-html-embedded-in-docx');
|
||||
|
||||
const jsreport = JsReport();
|
||||
jsreport.use(JsreportHtml2docx());
|
||||
|
||||
(async () => {
|
||||
const content = `<h1>Hello</h1>`;
|
||||
await jsreport.init();
|
||||
await jsreport.render({
|
||||
template: {
|
||||
content,
|
||||
engine: 'none',
|
||||
recipe: 'html-embedded-in-docx'
|
||||
}
|
||||
});
|
||||
})();
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"strictFunctionTypes": true,
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"jsreport-html-embedded-in-docx-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user