mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
add types for more jsreport extensions (#47327)
This commit is contained in:
parent
f649f4a87e
commit
2f53935499
19
types/jsreport-assets/index.d.ts
vendored
Normal file
19
types/jsreport-assets/index.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
// Type definitions for jsreport-assets 1.7
|
||||
// Project: https://github.com/jsreport/jsreport-assets
|
||||
// Definitions by: pofider <https://github.com/pofider>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { ExtensionDefinition } from 'jsreport-core';
|
||||
|
||||
declare namespace JsReportAssets {
|
||||
interface Configuration {
|
||||
allowedFiles?: string;
|
||||
searchOnDiskIfNotFoundInStore?: boolean;
|
||||
rootUrlForLinks?: string;
|
||||
publicAccessEnabled?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
declare function JsReportAssets(cfg?: JsReportAssets.Configuration): ExtensionDefinition;
|
||||
|
||||
export = JsReportAssets;
|
||||
11
types/jsreport-assets/jsreport-assets-tests.ts
Normal file
11
types/jsreport-assets/jsreport-assets-tests.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import JsReport = require('jsreport-core');
|
||||
import JsReportAssets = require('jsreport-assets');
|
||||
|
||||
(async () => {
|
||||
const jsreport = JsReport();
|
||||
jsreport.use(JsReportAssets({
|
||||
publicAccessEnabled: true
|
||||
}));
|
||||
await jsreport.init();
|
||||
await jsreport.close();
|
||||
})();
|
||||
23
types/jsreport-assets/tsconfig.json
Normal file
23
types/jsreport-assets/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"jsreport-assets-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/jsreport-assets/tslint.json
Normal file
1
types/jsreport-assets/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
20
types/jsreport-client/index.d.ts
vendored
Normal file
20
types/jsreport-client/index.d.ts
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
// Type definitions for jsreport-client 1.2
|
||||
// Project: https://github.com/jsreport/nodejs-client
|
||||
// Definitions by: pofider <https://github.com/pofider>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import jsreport = require('jsreport');
|
||||
import JsReport = require('jsreport-core');
|
||||
import { ServerResponse } from 'http';
|
||||
|
||||
declare module 'jsreport-core' {
|
||||
interface ClientRenderResponse extends ServerResponse {
|
||||
body(): Promise<Buffer>;
|
||||
}
|
||||
interface Client {
|
||||
render(req: Partial<Request>, options?: object): Promise<ClientRenderResponse>;
|
||||
}
|
||||
}
|
||||
|
||||
declare function CreateJsReportClient(url: string, username?: string, password?: string): JsReport.Client;
|
||||
export = CreateJsReportClient;
|
||||
18
types/jsreport-client/jsreport-client-tests.ts
Normal file
18
types/jsreport-client/jsreport-client-tests.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import JsReport = require('jsreport');
|
||||
import Client = require('jsreport-client');
|
||||
|
||||
(async () => {
|
||||
const jsreport = JsReport();
|
||||
await jsreport.init();
|
||||
|
||||
const client = Client('http://localhost:5488');
|
||||
await client.render({
|
||||
template: {
|
||||
recipe: 'html',
|
||||
engine: 'none',
|
||||
content: 'html'
|
||||
}
|
||||
});
|
||||
|
||||
await jsreport.close();
|
||||
})();
|
||||
23
types/jsreport-client/tsconfig.json
Normal file
23
types/jsreport-client/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"jsreport-client-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/jsreport-client/tslint.json
Normal file
1
types/jsreport-client/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
8
types/jsreport-core/index.d.ts
vendored
8
types/jsreport-core/index.d.ts
vendored
@ -1,6 +1,7 @@
|
||||
// Type definitions for jsreport-core 1.5
|
||||
// Project: http://jsreport.net
|
||||
// Definitions by: taoqf <https://github.com/taoqf>
|
||||
// pofider <https://github.com/pofider>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@ -20,9 +21,13 @@ declare namespace JsReport {
|
||||
recipe: Recipe | string;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
preview?: boolean;
|
||||
}
|
||||
|
||||
interface Request {
|
||||
template: Partial<Template>;
|
||||
options: object;
|
||||
options?: Options;
|
||||
data: any;
|
||||
}
|
||||
|
||||
@ -79,6 +84,7 @@ declare namespace JsReport {
|
||||
render(options: Partial<Request>): Promise<Response>;
|
||||
discover(): Reporter;
|
||||
createListenerCollection(): ListenerCollection;
|
||||
close(): Promise<void>;
|
||||
}
|
||||
|
||||
interface Configuration {
|
||||
|
||||
34
types/jsreport-docx/index.d.ts
vendored
Normal file
34
types/jsreport-docx/index.d.ts
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
// Type definitions for jsreport-docx 2.8
|
||||
// Project: https://github.com/jsreport/jsreport-docx
|
||||
// Definitions by: pofider <https://github.com/pofider>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { ExtensionDefinition } from 'jsreport-core';
|
||||
|
||||
declare module 'jsreport-core' {
|
||||
interface Template {
|
||||
docx?: JsReportDocx.DocxTemplate;
|
||||
}
|
||||
}
|
||||
|
||||
declare namespace JsReportDocx {
|
||||
interface Configuration {
|
||||
preview?: {
|
||||
enabled: true;
|
||||
publicUri: string;
|
||||
showWarning: false;
|
||||
};
|
||||
}
|
||||
|
||||
interface DocxTemplate {
|
||||
templateAsetShortid?: string;
|
||||
templateAsset?: {
|
||||
content: string;
|
||||
encoding: string;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
declare function JSReportDocx(cfg?: JsReportDocx.Configuration): ExtensionDefinition;
|
||||
|
||||
export = JSReportDocx;
|
||||
25
types/jsreport-docx/jsreport-docx-tests.ts
Normal file
25
types/jsreport-docx/jsreport-docx-tests.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import JsReport = require('jsreport-core');
|
||||
import JsReportDocx = require('jsreport-docx');
|
||||
|
||||
(async () => {
|
||||
const jsreport = JsReport();
|
||||
jsreport.use(JsReportDocx());
|
||||
|
||||
try {
|
||||
await jsreport.render({
|
||||
template: {
|
||||
content: '',
|
||||
recipe: 'docx',
|
||||
engine: 'handlebars',
|
||||
docx: {
|
||||
templateAsetShortid: 'aaaa'
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
// intentional
|
||||
}
|
||||
|
||||
await jsreport.init();
|
||||
await jsreport.close();
|
||||
})();
|
||||
23
types/jsreport-docx/tsconfig.json
Normal file
23
types/jsreport-docx/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"jsreport-docx-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/jsreport-docx/tslint.json
Normal file
1
types/jsreport-docx/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
10
types/jsreport-handlebars/index.d.ts
vendored
Normal file
10
types/jsreport-handlebars/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for jsreport-handlebars 2.1
|
||||
// Project: https://github.com/jsreport/jsreport-handlebars
|
||||
// Definitions by: pofider <https://github.com/pofider>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { ExtensionDefinition } from 'jsreport-core';
|
||||
|
||||
declare function JsReportHandlebars(): ExtensionDefinition;
|
||||
|
||||
export = JsReportHandlebars;
|
||||
9
types/jsreport-handlebars/jsreport-handlebars-tests.ts
Normal file
9
types/jsreport-handlebars/jsreport-handlebars-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import JsReport = require('jsreport-core');
|
||||
import JsReportHandlebars = require('jsreport-handlebars');
|
||||
|
||||
(async () => {
|
||||
const jsreport = JsReport();
|
||||
jsreport.use(JsReportHandlebars());
|
||||
await jsreport.init();
|
||||
await jsreport.close();
|
||||
})();
|
||||
23
types/jsreport-handlebars/tsconfig.json
Normal file
23
types/jsreport-handlebars/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"jsreport-handlebars-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/jsreport-handlebars/tslint.json
Normal file
1
types/jsreport-handlebars/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
58
types/jsreport-pdf-utils/index.d.ts
vendored
Normal file
58
types/jsreport-pdf-utils/index.d.ts
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
// Type definitions for jsreport-pdf-utils 1.9
|
||||
// Project: https://github.com/jsreport/jsreport-pdf-utils
|
||||
// Definitions by: pofider <https://github.com/pofider>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { ExtensionDefinition, Template } from 'jsreport-core';
|
||||
|
||||
declare module 'jsreport-core' {
|
||||
interface Template {
|
||||
pdfOperations?: JsReportPdfUtils.PdfOperation[];
|
||||
pdfMeta?: JsReportPdfUtils.PdfMeta;
|
||||
pdfSign?: JsReportPdfUtils.PdfSign;
|
||||
pdfPassword?: JsReportPdfUtils.PdfPassword;
|
||||
}
|
||||
}
|
||||
|
||||
declare namespace JsReportPdfUtils {
|
||||
interface PdfOperation {
|
||||
type: "merge" | "append" | "prepend";
|
||||
mergeWholeDocument?: boolean;
|
||||
renderForEveryPage?: boolean;
|
||||
templateShortid?: string;
|
||||
template?: Template;
|
||||
}
|
||||
|
||||
interface PdfMeta {
|
||||
title?: string;
|
||||
author?: string;
|
||||
subject?: string;
|
||||
keywords?: string;
|
||||
creator?: string;
|
||||
producer?: string;
|
||||
}
|
||||
|
||||
interface PdfSign {
|
||||
certificateAsset: {
|
||||
contrent: string;
|
||||
encoding: string;
|
||||
password: string;
|
||||
};
|
||||
reason: string;
|
||||
}
|
||||
|
||||
interface PdfPassword {
|
||||
password: string;
|
||||
ownerPassword: string;
|
||||
printing: "HighResolution" | "NotAllowed" | "LowResolution";
|
||||
modifying: boolean;
|
||||
copying: boolean;
|
||||
fillingForms: boolean;
|
||||
contentAccessibility: boolean;
|
||||
documentAssembly: true;
|
||||
}
|
||||
}
|
||||
|
||||
declare function JSReportPdfUtils(): ExtensionDefinition;
|
||||
|
||||
export = JSReportPdfUtils;
|
||||
25
types/jsreport-pdf-utils/jsreport-pdf-utils-tests.ts
Normal file
25
types/jsreport-pdf-utils/jsreport-pdf-utils-tests.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import JsReport = require('jsreport-core');
|
||||
import JsReportPdfUtils = require('jsreport-pdf-utils');
|
||||
|
||||
(async () => {
|
||||
const jsreport = JsReport();
|
||||
jsreport.use(JsReportPdfUtils());
|
||||
|
||||
try {
|
||||
await jsreport.render({
|
||||
template: {
|
||||
content: '',
|
||||
recipe: 'docx',
|
||||
engine: 'handlebars',
|
||||
pdfOperations: [{
|
||||
type: 'merge'
|
||||
}]
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
// intentional
|
||||
}
|
||||
|
||||
await jsreport.init();
|
||||
await jsreport.close();
|
||||
})();
|
||||
23
types/jsreport-pdf-utils/tsconfig.json
Normal file
23
types/jsreport-pdf-utils/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"jsreport-pdf-utils-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/jsreport-pdf-utils/tslint.json
Normal file
1
types/jsreport-pdf-utils/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
29
types/jsreport-reports/index.d.ts
vendored
Normal file
29
types/jsreport-reports/index.d.ts
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
// Type definitions for jsreport-reports 2.5
|
||||
// Project: https://github.com/jsreport/jsreport-reports
|
||||
// Definitions by: pofider <https://github.com/pofider>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { ExtensionDefinition } from 'jsreport-core';
|
||||
|
||||
declare module 'jsreport-core' {
|
||||
interface Options {
|
||||
reports?: JsReportReports.ReportsOptions;
|
||||
}
|
||||
}
|
||||
|
||||
declare namespace JsReportReports {
|
||||
interface Configuration {
|
||||
cleanInterval?: string;
|
||||
cleanTreshold?: string;
|
||||
}
|
||||
|
||||
interface ReportsOptions {
|
||||
save?: boolean;
|
||||
async?: boolean;
|
||||
public?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
declare function JsReportReports(cfg?: JsReportReports.Configuration): ExtensionDefinition;
|
||||
|
||||
export = JsReportReports;
|
||||
23
types/jsreport-reports/jsreport-reports-tests.ts
Normal file
23
types/jsreport-reports/jsreport-reports-tests.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import JsReport = require('jsreport-core');
|
||||
import JsReportReports = require('jsreport-reports');
|
||||
|
||||
(async () => {
|
||||
const jsreport = JsReport();
|
||||
jsreport.use(JsReportReports());
|
||||
|
||||
await jsreport.render({
|
||||
template: {
|
||||
content: '',
|
||||
recipe: 'html',
|
||||
engine: 'handlebars',
|
||||
},
|
||||
options: {
|
||||
reports: {
|
||||
save: true
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
await jsreport.init();
|
||||
await jsreport.close();
|
||||
})();
|
||||
23
types/jsreport-reports/tsconfig.json
Normal file
23
types/jsreport-reports/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"jsreport-reports-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/jsreport-reports/tslint.json
Normal file
1
types/jsreport-reports/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
28
types/jsreport-scripts/index.d.ts
vendored
Normal file
28
types/jsreport-scripts/index.d.ts
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
// Type definitions for jsreport-scripts 2.6
|
||||
// Project: https://github.com/jsreport/jsreport-scripts
|
||||
// Definitions by: pofider <https://github.com/pofider>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { ExtensionDefinition } from 'jsreport-core';
|
||||
|
||||
declare module 'jsreport-core' {
|
||||
interface Template {
|
||||
scripts?: JsReportScripts.TemplateScript[];
|
||||
}
|
||||
}
|
||||
|
||||
declare namespace JsReportScripts {
|
||||
interface TemplateScript {
|
||||
shortid?: string;
|
||||
name?: string;
|
||||
content?: string;
|
||||
}
|
||||
|
||||
interface Configuration {
|
||||
allowedModules?: string[] | "*";
|
||||
}
|
||||
}
|
||||
|
||||
declare function JsReportScripts(cfg?: JsReportScripts.Configuration): ExtensionDefinition;
|
||||
|
||||
export = JsReportScripts;
|
||||
21
types/jsreport-scripts/jsreport-scripts-tests.ts
Normal file
21
types/jsreport-scripts/jsreport-scripts-tests.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import JsReport = require('jsreport-core');
|
||||
import JsReportScripts = require('jsreport-scripts');
|
||||
|
||||
(async () => {
|
||||
const jsreport = JsReport();
|
||||
jsreport.use(JsReportScripts());
|
||||
|
||||
await jsreport.render({
|
||||
template: {
|
||||
content: '',
|
||||
recipe: 'html',
|
||||
engine: 'handlebars',
|
||||
scripts: [{
|
||||
content: `function beforeRender(req, res) {}`
|
||||
}]
|
||||
}
|
||||
});
|
||||
|
||||
await jsreport.init();
|
||||
await jsreport.close();
|
||||
})();
|
||||
23
types/jsreport-scripts/tsconfig.json
Normal file
23
types/jsreport-scripts/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"jsreport-scripts-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/jsreport-scripts/tslint.json
Normal file
1
types/jsreport-scripts/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
16
types/jsreport-templates/index.d.ts
vendored
Normal file
16
types/jsreport-templates/index.d.ts
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
// Type definitions for jsreport-templates 2.4
|
||||
// Project: https://github.com/jsreport/jsreport-templates
|
||||
// Definitions by: pofider <https://github.com/pofider>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { ExtensionDefinition } from 'jsreport-core';
|
||||
|
||||
declare module 'jsreport-core' {
|
||||
interface Template {
|
||||
name?: string;
|
||||
}
|
||||
}
|
||||
|
||||
declare function JsReportTemplates(): ExtensionDefinition;
|
||||
|
||||
export = JsReportTemplates;
|
||||
10
types/jsreport-templates/jsreport-templates-tests.ts
Normal file
10
types/jsreport-templates/jsreport-templates-tests.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import JsReport = require('jsreport-core');
|
||||
import JsReportTemplates = require('jsreport-templates');
|
||||
|
||||
(async () => {
|
||||
const jsreport = JsReport();
|
||||
jsreport.use(JsReportTemplates());
|
||||
|
||||
await jsreport.init();
|
||||
await jsreport.close();
|
||||
})();
|
||||
23
types/jsreport-templates/tsconfig.json
Normal file
23
types/jsreport-templates/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"jsreport-templates-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/jsreport-templates/tslint.json
Normal file
1
types/jsreport-templates/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
9
types/jsreport/index.d.ts
vendored
9
types/jsreport/index.d.ts
vendored
@ -4,9 +4,16 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// import all availible types for jsreport included extensions
|
||||
import JsReportAssets = require('jsreport-assets');
|
||||
import JsReportChromePdf = require('jsreport-chrome-pdf');
|
||||
import JsReportJsRender = require('jsreport-jsrender');
|
||||
import JsReportDocx = require('jsreport-docx');
|
||||
import JsReportHandlebars = require('jsreport-handlebars');
|
||||
import JReportHtmlToXlsx = require('jsreport-html-to-xlsx');
|
||||
import JsReportJsRender = require('jsreport-jsrender');
|
||||
import JReportPdfUtils = require('jsreport-pdf-utils');
|
||||
import JsReportReports = require('jsreport-reports');
|
||||
import JsReportScripts = require('jsreport-scripts');
|
||||
import JsReportTemplates = require('jsreport-templates');
|
||||
import JsReportXlsx = require('jsreport-xlsx');
|
||||
|
||||
// just reexport types from core
|
||||
|
||||
Loading…
Reference in New Issue
Block a user