clutz
clutz copied to clipboard
clutz: output type guards for goog.base functions
It would be handy if clutz generated type guards for the goog.isX functions:
function isArray(val: any): val is Array<any>;
function isBoolean(val: any): val is boolean;
function isDateLike(val: any): val is goog.date.DateLike;
function isDef<T>(val: T | undefined): val is T;
function isDefAndNotNull<T>(val: T | undefined | null): val is T;
function isFunction(val: any): val is Function;
function isNull(val: any): val is null;
function isNumber(val: any): val is Number;
function isObject(val: any): val is Object;
function isString(val: any): val is string;
We ran into this during migration of .js to .ts, it would be helpful.