docs/libs/typescript.js
function appendOuterTypeParameters(typeParameters, node) {
            while (true) {
                node = node.parent;
                if (!node) {
                    return typeParameters;
                }
                if (node.kind === 221 /* ClassDeclaration */ || node.kind === 192 /* ClassExpression */ ||
                    node.kind === 220 /* FunctionDeclaration */ || node.kind === 179 /* FunctionExpression */ ||
                    node.kind === 147 /* MethodDeclaration */ || node.kind === 180 /* ArrowFunction */) {
                    var declarations = node.typeParameters;
                    if (declarations) {
                        return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations);
                    }
                }
            }
        }
function appendOuterTypeParameters(typeParameters, node) {
            while (true) {
                node = node.parent;
                if (!node) {
                    return typeParameters;
                }
                if (node.kind === 221 /* ClassDeclaration */ || node.kind === 192 /* ClassExpression */ ||
                    node.kind === 220 /* FunctionDeclaration */ || node.kind === 179 /* FunctionExpression */ ||
                    node.kind === 147 /* MethodDeclaration */ || node.kind === 180 /* ArrowFunction */) {
                    var declarations = node.typeParameters;
                    if (declarations) {
                        return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations);
                    }
                }
            }
        }
function appendOuterTypeParameters ( typeParameters , node ) { while ( true ) { node = node . parent ; if ( ! node ) { return typeParameters ; } if ( node . kind === 221 /* ClassDeclaration */ || node . kind === 192 /* ClassExpression */ || node . kind === 220 /* FunctionDeclaration */ || node . kind === 179 /* FunctionExpression */ || node . kind === 147 /* MethodDeclaration */ || node . kind === 180 /* ArrowFunction */ ) { var declarations = node . typeParameters ; if ( declarations ) { return appendTypeParameters ( appendOuterTypeParameters ( typeParameters , node ) , declarations ) ; } } } }
Appends the outer type parameters of a node to a set of type parameters and returns the resulting set. The function allocates a new array if the input type parameter set is undefined, but otherwise it modifies the set in-place and returns the same array.
Appends the outer type parameters of a node to a set of type parameters and returns the resulting set . The function allocates a new array if the input type parameter set is undefined but otherwise it modifies the set in - place and returns the same array .