demo/typescript.js
function isIndependentFunctionLikeDeclaration(node) {
            if (node.kind !== 144 /* Constructor */ && (!node.type || !isIndependentType(node.type))) {
                return false;
            }
            for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
                var parameter = _a[_i];
                if (!isIndependentVariableLikeDeclaration(parameter)) {
                    return false;
                }
            }
            return true;
        }
function isIndependentFunctionLikeDeclaration(node) {
            if (node.kind !== 144 /* Constructor */ && (!node.type || !isIndependentType(node.type))) {
                return false;
            }
            for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
                var parameter = _a[_i];
                if (!isIndependentVariableLikeDeclaration(parameter)) {
                    return false;
                }
            }
            return true;
        }
A function-like declaration is considered independent (free of this references) if it has a return type annotation that is considered independent and if each parameter is considered independent.