enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
200 stars 34 forks source link

`nodeResolved` and `nodeImported` in `ImportNodesParams` and `ExportNodesParams` should be optional #10409

Closed alansemenov closed 7 months ago

alansemenov commented 7 months ago

These properties are currently mandatory and have to be specified for every import/export, even if you don't care about the number of resolved/imported nodes.

    const nodes = importNodes({
        source: resolve('/import'),
        targetNodePath: '/content',
        xslt: resolve('/import/replace_app.xsl'),
        xsltParams: {
            applicationId: app.name
        },
        includeNodeIds: true,
        nodeImported: () => {},
        nodeResolved: () => {}
    });

They should be optional. They are already correctly defined as nullable in the jsdoc definitions and the java beans.