Title: 14.1: InjectFlags deprecated, but used by Injector.get · Issue #46943 · angular/angular · GitHub
Open Graph Title: 14.1: InjectFlags deprecated, but used by Injector.get · Issue #46943 · angular/angular
X Title: 14.1: InjectFlags deprecated, but used by Injector.get · Issue #46943 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? Yes Description When upgrading to @angular/core 14.1.0 from 14.0.5, I'm getting new lint warnings for this code: /** Injection token for any types in a del...
Open Graph Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? Yes Description When upgrading to @angular/core 14.1.0 from 14.0.5, I'm getting new lint warnings for this code: /*...
X Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? Yes Description When upgrading to @angular/core 14.1.0 from 14.0.5, I'm getting new lint warnings for this code...
Opengraph URL: https://github.com/angular/angular/issues/46943
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"14.1: InjectFlags deprecated, but used by Injector.get","articleBody":"### Which @angular/* package(s) are the source of the bug?\r\n\r\ncore\r\n\r\n### Is this a regression?\r\n\r\nYes\r\n\r\n### Description\r\n\r\nWhen upgrading to `@angular/core 14.1.0` from 14.0.5, I'm getting new lint warnings for this code:\r\n\r\n```ts\r\n/** Injection token for any types in a delay-loaded module that will be loaded and initialized. */\r\nexport const INIT = new InjectionToken\u003cType\u003cunknown> | InjectionToken\u003cunknown>>('INIT');\r\n\r\nexport function loadAndInitializeInitTokens(injector: Injector) {\r\n let loadTypes: unknown | unknown[] | null = injector.get(INIT, null, InjectFlags.Self | InjectFlags.Optional);\r\n}\r\n```\r\n\r\nThe lint output is:\r\nLint warnings:\r\n```\r\nfile.ts\r\n 37:72 warning 'InjectFlags' is deprecated. use an options object for `inject` instead @delagen/deprecation/deprecation\r\n 37:91 warning 'InjectFlags' is deprecated. use an options object for `inject` instead @delagen/deprecation/deprecation\r\n```\r\n\r\nHowever, there is no overload for `Injector.get` that takes an options object or supports equivalent functionality as `InjectFlags`.\r\n\r\n\r\n### Please provide the exception or error you saw\r\n\r\n```\r\nLint warnings:\r\n\r\nfile.ts\r\n 37:72 warning 'InjectFlags' is deprecated. use an options object for `inject` instead @delagen/deprecation/deprecation\r\n 37:91 warning 'InjectFlags' is deprecated. use an options object for `inject` instead @delagen/deprecation/deprecation\r\n```\r\n\r\n\r\n### Please provide the environment you discovered this bug in (run `ng version`)\r\n\r\n```true\r\nAngular CLI: 14.1.0\r\nNode: 16.10.0\r\nPackage Manager: yarn 3.2.1\r\nOS: win32 x64\r\n\r\nAngular: 14.1.0\r\n... animations, cdk, cli, common, compiler, compiler-cli, core\r\n... forms, language-service, platform-browser\r\n... platform-browser-dynamic, router\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1401.0\r\n@angular-devkit/build-angular 14.1.0\r\n@angular-devkit/core 14.1.0\r\n@angular-devkit/schematics 14.1.0\r\n@schematics/angular 14.1.0\r\nng-packagr 14.1.0\r\nrxjs 7.5.6\r\ntypescript 4.7.4\r\nwebpack 5.73.0\r\n```\r\n\r\n\r\n### Anything else?\r\n\r\nLooks like this was caused by https://github.com/angular/angular/pull/46649\r\n\r\nThis is a lint error, so not a significant problem, but is worth noting.","author":{"url":"https://github.com/johnc-ftl","@type":"Person","name":"johnc-ftl"},"datePublished":"2022-07-22T19:07:14Z","url":"https://github.com/angular/angular/issues/46943"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:458edca5-6dd9-b085-7adf-870e4e287c8b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9210:317608:AADC82:DA051F:6B00F3F6 |
| html-safe-nonce | 87e65c65e840c5b6a33d5e624ff7f5cdabd7bc0b2c0c0737b29d89959dca35b6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjEwOjMxNzYwODpBQURDODI6REEwNTFGOjZCMDBGM0Y2IiwidmlzaXRvcl9pZCI6IjIyMzM1MTk2MjcyMTQ4NDQ5MTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5ca179cc58bd64603b9a788e6f2fac83f88a69310c17cb1a9e1d3986ede26066 |
| hovercard-subject-tag | issue:1315331576 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/46943/issue_layout |
| twitter:image | https://opengraph.githubassets.com/82372edd72a0d14f6b7a03caeb0f139fdde4118c63cbec9a3eb0049c660b1683/angular/angular/issues/46943 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/82372edd72a0d14f6b7a03caeb0f139fdde4118c63cbec9a3eb0049c660b1683/angular/angular/issues/46943 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? core Is this a regression? Yes Description When upgrading to @angular/core 14.1.0 from 14.0.5, I'm getting new lint warnings for this code: /*... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | johnc-ftl |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width