0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 07:13:08 -05:00

fix: invalid setKeyHandler key parameter type

This commit is contained in:
Ioan Moldovan 2023-10-10 00:21:11 -04:00 committed by Neil Jenkins
parent 69e03f4cf5
commit ff7babcdd3
4 changed files with 4 additions and 4 deletions

2
dist/squire.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/squire.mjs.map vendored

File diff suppressed because one or more lines are too long

View file

@ -50,7 +50,7 @@ declare class Squire {
constructor(root: HTMLElement, config?: Partial<SquireConfig>); constructor(root: HTMLElement, config?: Partial<SquireConfig>);
destroy(): void; destroy(): void;
_makeConfig(userConfig?: object): SquireConfig; _makeConfig(userConfig?: object): SquireConfig;
setKeyHandler(key: number, fn: KeyHandlerFunction): this; setKeyHandler(key: string, fn: KeyHandlerFunction): this;
_beforeInput(event: InputEvent): void; _beforeInput(event: InputEvent): void;
handleEvent(event: Event): void; handleEvent(event: Event): void;
fireEvent(type: string, detail?: Event | object): Squire; fireEvent(type: string, detail?: Event | object): Squire;

View file

@ -249,7 +249,7 @@ class Squire {
return config; return config;
} }
setKeyHandler(key: number, fn: KeyHandlerFunction) { setKeyHandler(key: string, fn: KeyHandlerFunction) {
this._keyHandlers[key] = fn; this._keyHandlers[key] = fn;
return this; return this;
} }