UNPKG

@connectv/core

Version:

agent-based reactive programming library for typescript/javascript

20 lines (19 loc) 482 B
/** * * Denotes that this object can (and perhaps should be) cleared at some point, * using its `.clear()` method. * */ export interface Clearable { clear(): any; } /** * * Checks if given object matches [Clearable](https://connective.dev/docs/interfaces#clearable) interface. * Basically checks if `.clear()` method exists. * * @param whatever * @return `true` if `any` is `Clerable` * */ export declare function isClearable(whatever: any): whatever is Clearable;