jsPDF-AutoTable icon indicating copy to clipboard operation
jsPDF-AutoTable copied to clipboard

HookData and CellHookData types are not exported

Open Nervniyak opened this issue 5 years ago • 2 comments

I wanted to type my data input in function as CellHookData, but could not import the type, because it is not exported unlike for example MarginPadding and ContentInput

declare class HookData {
	table: Table;
	pageNumber: number;
	pageCount: number;
	settings: Settings;
	doc: jsPDFDocument;
	cursor: Pos | null;
	constructor(doc: DocHandler, table: Table, cursor: Pos | null);
}
declare class CellHookData extends HookData {
	cell: Cell;
	row: Row;
	column: Column;
	section: "head" | "body" | "foot";
	constructor(doc: DocHandler, table: Table, cell: Cell, row: Row, column: Column, cursor: Pos | null);
}
export declare type MarginPadding = {
	top: number;
	right: number;
	bottom: number;
	left: number;
};
export interface ContentInput {
	body: RowInput[];
	head: RowInput[];
	foot: RowInput[];
	columns: ColumnInput[];
}

image

Is there any reason for it to be not exported? I have to use any not sure if there's workaround.

Nervniyak avatar Sep 15 '20 22:09 Nervniyak

Nope, it should probably be experted. Ill accept a PR right away if publisher 👌

simonbengtsson avatar Sep 15 '20 23:09 simonbengtsson

https://github.com/simonbengtsson/jsPDF-AutoTable/pull/721

Nervniyak avatar Sep 16 '20 11:09 Nervniyak