deprecated-component.js 836 B

123456789101112131415161718
  1. "use strict";
  2. /**
  3. * Use of this source code is governed by an MIT-style license that can be
  4. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  5. */
  6. Object.defineProperty(exports, "__esModule", { value: true });
  7. exports.deprecatedComponent = void 0;
  8. const elements_1 = require("../../../utils/ng-update/elements");
  9. const deprecatedComponent = (template, deprecated, instead) => {
  10. return (0, elements_1.findElementWithTag)(template.content, deprecated)
  11. .map(offset => ({
  12. filePath: template.filePath,
  13. position: template.getCharacterAndLineOfPosition(offset),
  14. message: `Found deprecated '<${deprecated}>' component. Please use '${instead}' instead.`
  15. }));
  16. };
  17. exports.deprecatedComponent = deprecatedComponent;
  18. //# sourceMappingURL=deprecated-component.js.map