Skip to content

Commit

Permalink
TypeScript definitions (#458)
Browse files Browse the repository at this point in the history
* Created 1st version of TypeScript definitions

* Added reference to types file

Co-authored-by: Julien Mariller <[email protected]>
  • Loading branch information
jmariller and Julien Mariller authored May 23, 2020
1 parent ec2519f commit 72b5cdc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
24 changes: 24 additions & 0 deletions dist/jquery.floatThead.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
interface floatTheadOptions {
position?: string;
scrollContainer?: ($container: JQuery) => void | boolean;
responsiveContainer?: ($container: JQuery) => void;
ariaLabel: ($table: JQuery, $headerCell: JQuery, columnIndex: number) => void;
headerCellSelector?: string;
floatTableClass?: string;
floatContainerClass?: string;
top?: number;
bottom?: number;
zIndex?: number;
debug?: boolean;
getSizingRow?: () => void;
copyTableClass?: boolean;
autoReflow?: boolean;
}

interface JQuery {
floatThead(floatTheadOptions?: floatTheadOptions): void;
floatThead(action: string): void;
trigger(action: string): void;
on(events: string, handler: (event: Event, $floatContainer: JQuery) => void): void;
on(events: string, handler: (event: Event, isFloated: boolean, $floatContainer: JQuery) => void): void;
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "2.1.4",
"description": "fixed table header plugin that works",
"main": "dist/jquery.floatThead.min.js",
"type": "dist/jquery.floatThead.d.ts",
"scripts": {
"build": "cp src/jquery.floatThead.js dist/jquery.floatThead.js && uglifyjs dist/jquery.floatThead.js --compress --mangle --comments -o dist/jquery.floatThead.min.js"
},
Expand All @@ -21,7 +22,7 @@
"fixed table header",
"table",
"thead",
"the cat is cute",
"the cat is cute",
"floatThead",
"scrolling table",
"jQuery plugin"
Expand Down

0 comments on commit 72b5cdc

Please sign in to comment.