mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-20 23:10:41 -07:00
fix: isComparable full interface check (#701)
* Improve isComparable function to ensure full Comparable interface implementation * Deleted trailing commas --------- Co-authored-by: Guillermo Casal Caro <[email protected]>
This commit is contained in:
co-authored by
Guillermo Casal Caro
parent
6ca5376362
commit
55e144a029
@@ -9,5 +9,12 @@ export interface Comparable {
|
||||
}
|
||||
|
||||
export function isComparable (arg: any): arg is Comparable {
|
||||
return arg && isFunction(arg.equals)
|
||||
return (
|
||||
arg &&
|
||||
isFunction(arg.equals) &&
|
||||
isFunction(arg.gt) &&
|
||||
isFunction(arg.geq) &&
|
||||
isFunction(arg.lt) &&
|
||||
isFunction(arg.leq)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user