clutz icon indicating copy to clipboard operation
clutz copied to clipboard

clutz: output type guards for goog.base functions

Open ribrdb opened this issue 8 years ago • 1 comments

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;

ribrdb avatar Mar 18 '18 22:03 ribrdb

We ran into this during migration of .js to .ts, it would be helpful.

rkirov avatar Apr 25 '18 17:04 rkirov