Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,16 @@ interface Juice {

codeBlocks: { [index: string]: { start: string, end: string } };
excludedProperties: string[];
heightElements: HTMLElement[];
/** Upper-case tag names, e.g. `['TABLE', 'TD', 'TH', 'IMG']` */
heightElements: string[];
ignoredPseudos: string[];
nonVisualElements: HTMLElement[];
/** Upper-case tag names */
nonVisualElements: string[];
styleToAttribute: { [index: string]: string };
tableElements: HTMLElement[];
widthElements: HTMLElement[];
/** Upper-case tag names */
tableElements: string[];
/** Upper-case tag names, e.g. `['TABLE', 'TD', 'TH', 'IMG']` */
widthElements: string[];
}

declare const juice: Juice;
Expand Down
5 changes: 5 additions & 0 deletions test/typescript/juice-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,8 @@ juice.styleToAttribute = { x: 'y' };
juice.tableElements = [];
juice.nonVisualElements = [];
juice.excludedProperties = [];

juice.widthElements = ['IMG', 'VIDEO'];
juice.heightElements = ['IMG', 'VIDEO'];
juice.tableElements = [...juice.tableElements, 'TD'];
juice.nonVisualElements = juice.nonVisualElements.filter((name) => name !== 'NOSCRIPT');
4 changes: 3 additions & 1 deletion test/typescript/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2022"],
"types": ["node"],
"module": "nodenext",
"moduleResolution": "nodenext",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"skipLibCheck": false,
"noEmitOnError": true
},
"include": ["juice-tests.ts"]
Expand Down
Loading