app_component.d.ts 1.2 KB

1234567891011121314151617181920212223242526272829
  1. /**
  2. * @license
  3. * Copyright Google LLC All Rights Reserved.
  4. *
  5. * Use of this source code is governed by an MIT-style license that can be
  6. * found in the LICENSE file at https://angular.dev/license
  7. */
  8. import { Tree } from '@angular-devkit/schematics';
  9. /** Data resolved for a bootstrapped component. */
  10. interface BootstrappedComponentData {
  11. /** Original name of the component class. */
  12. componentName: string;
  13. /** Path under which the component was imported in the main entrypoint. */
  14. componentImportPathInSameFile: string;
  15. /** Original name of the NgModule being bootstrapped, null if the app isn't module-based. */
  16. moduleName: string | null;
  17. /**
  18. * Path under which the module was imported in the main entrypoint,
  19. * null if the app isn't module-based.
  20. */
  21. moduleImportPathInSameFile: string | null;
  22. }
  23. /**
  24. * Finds the original name and path relative to the `main.ts` of the bootrstrapped app component.
  25. * @param tree File tree in which to look for the component.
  26. * @param mainFilePath Path of the `main` file.
  27. */
  28. export declare function resolveBootstrappedComponentData(tree: Tree, mainFilePath: string): BootstrappedComponentData | null;
  29. export {};