docs/libs/typescript.js
function isRequireCall(expression, checkArgumentIsStringLiteral) {
        // of the form 'require("name")'
        var isRequire = expression.kind === 174 /* CallExpression */ &&
            expression.expression.kind === 69 /* Identifier */ &&
            expression.expression.text === "require" &&
            expression.arguments.length === 1;
        return isRequire && (!checkArgumentIsStringLiteral || expression.arguments[0].kind === 9 /* StringLiteral */);
    }
function isRequireCall(expression, checkArgumentIsStringLiteral) {
        // of the form 'require("name")'
        var isRequire = expression.kind === 174 /* CallExpression */ &&
            expression.expression.kind === 69 /* Identifier */ &&
            expression.expression.text === "require" &&
            expression.arguments.length === 1;
        return isRequire && (!checkArgumentIsStringLiteral || expression.arguments[0].kind === 9 /* StringLiteral */);
    }
function isRequireCall ( expression , checkArgumentIsStringLiteral ) { // of the form 'require("name")' var isRequire = expression . kind === 174 /* CallExpression */ && expression . expression . kind === 69 /* Identifier */ && expression . expression . text === "require" && expression . arguments . length === 1 ; return isRequire && ( ! checkArgumentIsStringLiteral || expression . arguments [ 0 ] . kind === 9 /* StringLiteral */ ) ; }
Returns true if the node is a CallExpression to the identifier 'require' with
exactly one argument.
This function does not test if the node is in a JavaScript file or not.
Returns true if the node is a CallExpression to the identifier require with exactly one argument . This function does not test if the node is in a JavaScript file or not .