demo/typescript.js
function someConstituentTypeHasKind(type, kind) {
            if (type.flags & kind) {
                return true;
            }
            if (type.flags & 49152 /* UnionOrIntersection */) {
                var types = type.types;
                for (var _i = 0; _i < types.length; _i++) {
                    var current = types[_i];
                    if (current.flags & kind) {
                        return true;
                    }
                }
                return false;
            }
            return false;
        }
function someConstituentTypeHasKind(type, kind) {
            if (type.flags & kind) {
                return true;
            }
            if (type.flags & 49152 /* UnionOrIntersection */) {
                var types = type.types;
                for (var _i = 0; _i < types.length; _i++) {
                    var current = types[_i];
                    if (current.flags & kind) {
                        return true;
                    }
                }
                return false;
            }
            return false;
        }
function someConstituentTypeHasKind ( type , kind ) { if ( type . flags & kind ) { return true ; } if ( type . flags & 49152 /* UnionOrIntersection */ ) { var types = type . types ; for ( var _i = 0 ; _i < types . length ; _i ++ ) { var current = types [ _i ] ; if ( current . flags & kind ) { return true ; } } return false ; } return false ; }
Just like isTypeOfKind below, except that it returns true if *any* constituent has this kind.
Just like isTypeOfKind below except that it returns true if * any * constituent has this kind .