- when(predicate: ((info: IStatInfo, entity: default<unknown, number, EntityReferenceTypes, unknown>, statElement: default<HTMLElement>) => boolean), handler: ((matched: boolean, statElement: default<HTMLElement>, entity: default<unknown, number, EntityReferenceTypes, unknown>, info: IStatInfo) => any)): ((statElement: default, entity: default, stat: IStat, oldValue?: number) => void)
-
Parameters
-
predicate: ((info: IStatInfo, entity: default<unknown, number, EntityReferenceTypes, unknown>, statElement: default<HTMLElement>) => boolean)
-
handler: ((matched: boolean, statElement: default<HTMLElement>, entity: default<unknown, number, EntityReferenceTypes, unknown>, info: IStatInfo) => any)
Returns ((statElement: default, entity: default, stat: IStat, oldValue?: number) => void)
-
- (statElement: default, entity: default, stat: IStat, oldValue?: number): void
-
Parameters
-
-
-
-
Optional
oldValue: number
Returns void
Returns a
IStatDescription["onChange"]
handler that will check a predicate and run the handler with the result of that predicate.