Skip to content

Commit

Permalink
Merge pull request #47 from TJDoesCode/master
Browse files Browse the repository at this point in the history
typings: add typings
  • Loading branch information
STRML committed Mar 23, 2021
2 parents 5a10290 + 0dd8122 commit 5f8a946
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Author: Trevor R <https://github.com/TJDoesCode>
// Date: 3/22/21

declare module "textfit" {
interface textFitOptions {
alignVert?: boolean;
alignHoriz?: boolean;
multiLine?: boolean;
detectMultiLine?: boolean;
minFontSize?: number;
maxFontSize?: number;
reProcess?: boolean;
widthOnly?: boolean;
alignVertWithFlexbox?: boolean;
}

export = textFit;

function textFit(
els: Element | Element[] | NodeListOf<Element> | HTMLCollection | null,
options?: textFitOptions
): void;
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "2.4.0",
"description": "A fast, jQuery-free text sizing component that quickly fits single and multi-line text to the width (and optionally height) of its container.",
"main": "textFit.js",
"types": "index.d.ts",
"directories": {
"example": "examples"
},
Expand Down

0 comments on commit 5f8a946

Please sign in to comment.