Skip to content

Commit 25880a0

Browse files
committed
feat: refactor codebase to TypeScript
BREAKING CHANGE: API now accessed via returned object when calling finput() rather than accessed directly on element itself
1 parent 56393fb commit 25880a0

18 files changed

+2187
-2540
lines changed

.babelrc

Lines changed: 0 additions & 9 deletions
This file was deleted.

finput.d.ts

Lines changed: 0 additions & 32 deletions
This file was deleted.

index.d.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import {ActionType, Key} from "./src/constants";
2+
3+
interface IState {
4+
value: string;
5+
caretStart: number;
6+
caretEnd: number;
7+
valid: boolean;
8+
}
9+
10+
interface IKeyInfo {
11+
keyName: Key;
12+
modifierKeys: string[];
13+
}
14+
15+
interface IOptions {
16+
thousands: string;
17+
decimal: string;
18+
fixed: boolean;
19+
range: number;
20+
scale: number;
21+
shortcuts: { [shortcut: string]: number }
22+
}
23+
24+
interface IActionType {
25+
type: ActionType;
26+
names: string[];
27+
// TODO: does this need to be an array? seems like all options only have one
28+
modifierKeys: Key[];
29+
}

0 commit comments

Comments
 (0)