Ignore:
Timestamp:
11/25/21 22:08:24 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
8d391a1
Parents:
59329aa
Message:

primeNG components

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/node_modules/@angular/compiler-cli/ngcc/src/host/umd_host.js

    r59329aa re29cc2e  
    470470    exports.UmdReflectionHost = UmdReflectionHost;
    471471    function parseStatementForUmdModule(statement) {
    472         var wrapperCall = getUmdWrapperCall(statement);
    473         if (!wrapperCall)
     472        var wrapper = getUmdWrapper(statement);
     473        if (wrapper === null)
    474474            return null;
    475         var wrapperFn = wrapperCall.expression;
    476         if (!ts.isFunctionExpression(wrapperFn))
    477             return null;
    478         var factoryFnParamIndex = wrapperFn.parameters.findIndex(function (parameter) { return ts.isIdentifier(parameter.name) && parameter.name.text === 'factory'; });
     475        var factoryFnParamIndex = wrapper.fn.parameters.findIndex(function (parameter) { return ts.isIdentifier(parameter.name) && parameter.name.text === 'factory'; });
    479476        if (factoryFnParamIndex === -1)
    480477            return null;
    481         var factoryFn = utils_2.stripParentheses(wrapperCall.arguments[factoryFnParamIndex]);
     478        var factoryFn = utils_2.stripParentheses(wrapper.call.arguments[factoryFnParamIndex]);
    482479        if (!factoryFn || !ts.isFunctionExpression(factoryFn))
    483480            return null;
    484         return { wrapperFn: wrapperFn, factoryFn: factoryFn };
     481        return { wrapperFn: wrapper.fn, factoryFn: factoryFn };
    485482    }
    486483    exports.parseStatementForUmdModule = parseStatementForUmdModule;
    487     function getUmdWrapperCall(statement) {
    488         if (!ts.isExpressionStatement(statement) || !ts.isParenthesizedExpression(statement.expression) ||
    489             !ts.isCallExpression(statement.expression.expression) ||
    490             !ts.isFunctionExpression(statement.expression.expression.expression)) {
     484    function getUmdWrapper(statement) {
     485        if (!ts.isExpressionStatement(statement))
    491486            return null;
     487        if (ts.isParenthesizedExpression(statement.expression) &&
     488            ts.isCallExpression(statement.expression.expression) &&
     489            ts.isFunctionExpression(statement.expression.expression.expression)) {
     490            // (function () { ... } (...) );
     491            var call = statement.expression.expression;
     492            var fn = statement.expression.expression.expression;
     493            return { call: call, fn: fn };
    492494        }
    493         return statement.expression.expression;
     495        if (ts.isCallExpression(statement.expression) &&
     496            ts.isParenthesizedExpression(statement.expression.expression) &&
     497            ts.isFunctionExpression(statement.expression.expression.expression)) {
     498            // (function () { ... }) (...);
     499            var call = statement.expression;
     500            var fn = statement.expression.expression.expression;
     501            return { call: call, fn: fn };
     502        }
     503        return null;
    494504    }
    495505    function getImportsOfUmdModule(umdModule) {
     
    537547    }
    538548});
    539 //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW1kX2hvc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb21waWxlci1jbGkvbmdjYy9zcmMvaG9zdC91bWRfaG9zdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7Ozs7Ozs7Ozs7Ozs7O0lBRUgsK0JBQWlDO0lBRWpDLDJFQUE0RDtJQUU1RCx5RUFBK0c7SUFFL0csOERBQWlGO0lBRWpGLDZGQUFrWTtJQUNsWSxpRkFBd0c7SUFDeEcsMkVBQStDO0lBRS9DLG1FQUF5QztJQUV6QztRQUF1Qyw2Q0FBa0I7UUFVdkQsMkJBQVksTUFBYyxFQUFFLE1BQWUsRUFBRSxHQUFrQixFQUFFLEdBQThCO1lBQTlCLG9CQUFBLEVBQUEsVUFBOEI7WUFBL0YsWUFDRSxrQkFBTSxNQUFNLEVBQUUsTUFBTSxFQUFFLEdBQUcsRUFBRSxHQUFHLENBQUMsU0FHaEM7WUFiUyxnQkFBVSxHQUNoQixJQUFJLGtCQUFVLENBQWdDLFVBQUEsRUFBRSxJQUFJLE9BQUEsS0FBSSxDQUFDLGdCQUFnQixDQUFDLEVBQUUsQ0FBQyxFQUF6QixDQUF5QixDQUFDLEN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