-
Notifications
You must be signed in to change notification settings - Fork 0
/
typings.d.ts
88 lines (82 loc) · 2.3 KB
/
typings.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
declare module 'eslint-plugin-import' {
import type { Linter } from 'eslint';
declare const js: {
readonly flatConfigs: {
readonly recommended: { readonly rules: Readonly<Linter.RulesRecord> };
};
};
export default js;
export = js;
}
declare module 'postject' {
export declare function inject(
filename: string, // The executable to inject into
resourceName: string, // The resource name to use (section name on Mach-O and ELF, resource name for PE)
resourceData: Buffer, // The resource to inject
options?: Partial<{
machoSegmentName: string;
overwrite: boolean;
sentinelFuse: string;
}>,
): Promise<void>;
}
declare module 'mock:buffer' {}
// https://github.com/TurboDocx/html-to-docx
declare module '@turbodocx/html-to-docx' {
export type DocumentOptions = {
orientation: 'portrait' | 'landscape';
pageSize: Partial<{ height: number; width: number }>;
margins: Partial<{
top: number;
right: number;
bottom: number;
left: number;
header: number;
footer: number;
gutter: number;
}>;
title: string;
subject: string;
creator: string;
keywords: string[];
description: string;
lastModifiedBy: string;
revision: number;
createdAt: Date;
modifiedAt: Date;
headerType: 'default' | 'first' | 'even';
header: boolean;
footerType: 'default' | 'first' | 'even';
footer: boolean;
font: string;
fontSize: number;
complexScriptFontSize: number;
table: Partial<{
row: { cantSplit: boolean };
borderOptions: Partial<{
size: number;
stroke: string;
color: string;
}>;
}>;
pageNumber: boolean;
skipFirstHeaderFooter: boolean;
lineNumber: boolean;
lineNumberOptions: Partial<{
start: number;
countBy: number;
restart: 'continuous' | 'newPage' | 'newSection';
}>;
numbering: { defaultOrderedListStyleType: 'decimal' | string };
decodeUnicode: boolean;
lang: `${Lowercase<string>}-${Uppercase<string>}`;
preprocessing: { skipHTMLMinify: boolean };
};
declare function HTMLtoDOCX(
htmlString: string,
headerHTMLString?: string,
documentOptions?: Partial<DocumentOptions>,
footerHTMLString?: string,
): Promise<Uint8Array>;
export default HTMLtoDOCX;
}