chore(eslint): fix isNumeric types
This commit is contained in:
parent
95b9e47993
commit
beafa21796
1 changed files with 3 additions and 2 deletions
|
@ -125,8 +125,9 @@ export function on(
|
|||
);
|
||||
}
|
||||
|
||||
export function isNumeric(n: string) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n as any as number);
|
||||
export function isNumeric(s: string) {
|
||||
const n = parseFloat(s);
|
||||
return !isNaN(n) && isFinite(n);
|
||||
}
|
||||
|
||||
function offset(element: HTMLElement) {
|
||||
|
|
Loading…
Reference in a new issue