-
Notifications
You must be signed in to change notification settings - Fork 26.2k
Account for type-only import specifier in TS 4.5 #43620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
area: compiler
Issues related to `ngc`, Angular's template compiler
refactoring
Issue that involves refactoring or code-cleanup
state: has PR
Milestone
Comments
crisbeto
added a commit
to crisbeto/angular
that referenced
this issue
Nov 15, 2021
Adds support for TypeScript 4.5. Includes the following changes: * Bumping the package versions. * Fixing a few calls to `createExportSpecifier` and `createImportSpecifier` that require an extra parameter. * Adding some missing methods to the TS compiler hosts. * Fixing an issue in the TS mocks for the ngcc tests where a regex was too agressive and was trying to match a path like `/node_modules/@typescript/lib-es5`. * Accounting for type-only import specifiers when reporting DI errors (see angular#43620). Fixes angular#43620.
crisbeto
added a commit
to crisbeto/angular
that referenced
this issue
Nov 17, 2021
Adds support for TypeScript 4.5. Includes the following changes: * Bumping the package versions. * Fixing a few calls to `createExportSpecifier` and `createImportSpecifier` that require an extra parameter. * Adding some missing methods to the TS compiler hosts. * Fixing an issue in the TS mocks for the ngcc tests where a regex was too agressive and was trying to match a path like `/node_modules/@typescript/lib-es5`. * Accounting for type-only import specifiers when reporting DI errors (see angular#43620). Fixes angular#43620.
crisbeto
added a commit
to crisbeto/angular
that referenced
this issue
Nov 20, 2021
Adds support for TypeScript 4.5. Includes the following changes: * Bumping the package versions. * Fixing a few calls to `createExportSpecifier` and `createImportSpecifier` that require an extra parameter. * Adding some missing methods to the TS compiler hosts. * Fixing an issue in the TS mocks for the ngcc tests where a regex was too agressive and was trying to match a path like `/node_modules/@typescript/lib-es5`. * Accounting for type-only import specifiers when reporting DI errors (see angular#43620). Fixes angular#43620.
crisbeto
added a commit
to crisbeto/angular
that referenced
this issue
Nov 23, 2021
Adds support for TypeScript 4.5. Includes the following changes: * Bumping the package versions. * Fixing a few calls to `createExportSpecifier` and `createImportSpecifier` that require an extra parameter. * Adding some missing methods to the TS compiler hosts. * Fixing an issue in the TS mocks for the ngcc tests where a regex was too agressive and was trying to match a path like `/node_modules/@typescript/lib-es5`. * Accounting for type-only import specifiers when reporting DI errors (see angular#43620). Fixes angular#43620.
crisbeto
added a commit
to crisbeto/angular
that referenced
this issue
Nov 24, 2021
Adds support for TypeScript 4.5. Includes the following changes: * Bumping the package versions. * Fixing a few calls to `createExportSpecifier` and `createImportSpecifier` that require an extra parameter. * Adding some missing methods to the TS compiler hosts. * Fixing an issue in the TS mocks for the ngcc tests where a regex was too agressive and was trying to match a path like `/node_modules/@typescript/lib-es5`. * Accounting for type-only import specifiers when reporting DI errors (see angular#43620). Fixes angular#43620.
crisbeto
added a commit
to crisbeto/angular
that referenced
this issue
Nov 30, 2021
Adds support for TypeScript 4.5. Includes the following changes: * Bumping the package versions. * Fixing a few calls to `createExportSpecifier` and `createImportSpecifier` that require an extra parameter. * Adding some missing methods to the TS compiler hosts. * Fixing an issue in the TS mocks for the ngcc tests where a regex was too agressive and was trying to match a path like `/node_modules/@typescript/lib-es5`. * Accounting for type-only import specifiers when reporting DI errors (see angular#43620). Fixes angular#43620.
crisbeto
added a commit
to crisbeto/angular
that referenced
this issue
Nov 30, 2021
Adds support for TypeScript 4.5. Includes the following changes: * Bumping the package versions. * Fixing a few calls to `createExportSpecifier` and `createImportSpecifier` that require an extra parameter. * Adding some missing methods to the TS compiler hosts. * Fixing an issue in the TS mocks for the ngcc tests where a regex was too agressive and was trying to match a path like `/node_modules/@typescript/lib-es5`. * Accounting for type-only import specifiers when reporting DI errors (see angular#43620). Fixes angular#43620.
crisbeto
added a commit
to crisbeto/angular
that referenced
this issue
Nov 30, 2021
Adds support for TypeScript 4.5. Includes the following changes: * Bumping the package versions. * Fixing a few calls to `createExportSpecifier` and `createImportSpecifier` that require an extra parameter. * Adding some missing methods to the TS compiler hosts. * Fixing an issue in the TS mocks for the ngcc tests where a regex was too agressive and was trying to match a path like `/node_modules/@typescript/lib-es5`. * Accounting for type-only import specifiers when reporting DI errors (see angular#43620). Fixes angular#43620.
dimakuba
pushed a commit
to dimakuba/angular
that referenced
this issue
Dec 28, 2021
Adds support for TypeScript 4.5. Includes the following changes: * Bumping the package versions. * Fixing a few calls to `createExportSpecifier` and `createImportSpecifier` that require an extra parameter. * Adding some missing methods to the TS compiler hosts. * Fixing an issue in the TS mocks for the ngcc tests where a regex was too agressive and was trying to match a path like `/node_modules/@typescript/lib-es5`. * Accounting for type-only import specifiers when reporting DI errors (see angular#43620). Fixes angular#43620. PR Close angular#44164
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area: compiler
Issues related to `ngc`, Angular's template compiler
refactoring
Issue that involves refactoring or code-cleanup
state: has PR
For upcoming TS 4.5 our
typeToValue
logic needs to account for microsoft/TypeScript#45998, where we should report an error if an import specifier is used that has a type-only modifier for a DI token.angular/packages/compiler-cli/src/ngtsc/reflection/src/type_to_value.ts
Lines 20 to 137 in a32a317
For example the following should be invalid:
The compiler is already capable of reporting errors for type-only import statements, it just needs to be expanded for type-only import specifiers.
The text was updated successfully, but these errors were encountered: