angular/packages/compiler-cli/private/migrations.ts
Paul Gschwendtner a02e270fcb build: properly compile tests in core with Angular compiler (#60268)
Previously we never could use relative imports to import e.g. `Component`
in e.g. the `core/tests/bundling` folder. This was necessary because otherwise the
Angular compiler wouldn't process those files as it wouldn't recognize
the Angular decorator as the one from `@angular/core`.

Notably this still isn't a large issue because relative imports still
work for most core tests, that are JIT compiled!

For bundling tests though, or some smaller targets, our new upcoming
guidelines for using relative imports inside the full package; fall
apart. This commit unblocks this effort and allows us to use relative
imports in all tests of `packages/core`. This is achieved by leveraging
the existing `isCore` functionality of the compiler, and fixing a few
instances that were missing before.

PR Close #60268
2025-03-07 11:00:47 -08:00

31 lines
920 B
TypeScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
/**
* @fileoverview The API from compiler-cli that the `@angular/core`
* package requires for migration schematics.
*/
export {createForwardRefResolver} from '../src/ngtsc/annotations';
export {AbsoluteFsPath} from '../src/ngtsc/file_system';
export {Reference} from '../src/ngtsc/imports';
export {
DynamicValue,
PartialEvaluator,
ResolvedValue,
ResolvedValueMap,
StaticInterpreter,
} from '../src/ngtsc/partial_evaluator';
export {reflectObjectLiteral, TypeScriptReflectionHost} from '../src/ngtsc/reflection';
export {
PotentialImport,
PotentialImportKind,
PotentialImportMode,
TemplateTypeChecker,
} from '../src/ngtsc/typecheck/api';
export {ImportManager} from '../src/ngtsc/translator';