How to use the @ngrx/data/schematics-core.createReplaceChange function in @ngrx/data

To help you get started, we’ve selected a few @ngrx/data examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ngrx / platform / modules / data / schematics / ng-add / index.ts View on Github external
}

    if (
      ts.isVariableDeclaration(node) &&
      node.type &&
      renameKeys.includes(node.type.getText(sourceFile))
    ) {
      change = {
        node: node.type,
        text: node.type.getText(sourceFile),
      };
    }

    if (change) {
      changes.push(
        createReplaceChange(
          sourceFile,
          change.node,
          change.text,
          (renames as any)[change.text]
        )
      );
    }

    ts.forEachChild(node, childNode => find(childNode, changes));
  }
}
github ngrx / platform / modules / data / schematics / ng-add / index.ts View on Github external
.map(({ specifier, text }) =>
      createReplaceChange(
        sourceFile,
        specifier!,
        text!,
        (renames as any)[text!]
      )
    );
github ngrx / platform / modules / data / schematics / ng-add / index.ts View on Github external
const changes = imports.map(specifier =>
    createReplaceChange(
      sourceFile,
      specifier.moduleSpecifier,
      "'ngrx-data'",
      "'@ngrx/data'"
    )
  );