liquidjs
Version:
A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.
15 lines (14 loc) • 612 B
TypeScript
/**
* Comparison methods may return a boolean, a promise, or a generator.
* Operators yield the result, so sync implementations stay valid and async
* `valueOf()` can be awaited with `yield`.
*/
export type ComparableResult = boolean | Promise<boolean> | Generator<unknown, boolean, any>;
export interface Comparable {
equals: (rhs: any) => ComparableResult;
gt: (rhs: any) => ComparableResult;
geq: (rhs: any) => ComparableResult;
lt: (rhs: any) => ComparableResult;
leq: (rhs: any) => ComparableResult;
}
export declare function isComparable(arg: any): arg is Comparable;