fix(web): cherrypicked code generic mismatch

This commit is contained in:
Joshua A. Horton 2023-07-19 12:04:30 +07:00
parent 3bf13f610b
commit 230ede74f7
2 changed files with 4 additions and 3 deletions

View file

@ -23,7 +23,7 @@ type PathUpdateResult = PathMatchResult | PathNotFulfilled;
export class PathMatcher<Type> {
private timerPromise?: TimeoutPromise;
private model: ContactModel;
private model: ContactModel<Type>;
private source: SimpleGestureSource<Type>;
private readonly publishedPromise: ManagedPromise<PathMatchResult>
@ -32,7 +32,7 @@ export class PathMatcher<Type> {
return this.publishedPromise.corePromise;
}
constructor(model: ContactModel, source: SimpleGestureSource<Type>) {
constructor(model: ContactModel<Type>, source: SimpleGestureSource<Type>) {
/* c8 ignore next 3 */
if(!model || !source) {
throw new Error("A gesture-path source and contact-path model must be specified.");

View file

@ -1,6 +1,7 @@
import { gestures } from '@keymanapp/gesture-recognizer';
import specs = gestures.specs;
import ContactModel = specs.ContactModel;
type ContactModel = specs.ContactModel<string>;
export const InstantRejectionModel: ContactModel = {
itemPriority: 0,