question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Router doesn't export the QueryParamsHandling interface anymore

See original GitHub issue

🐞 bug report

Affected Package

The issue is caused by package @angular/router

Is this a regression?

Yes, the previous version in which this bug was not present was: angular 7.*

Description

After migrating to angular 8.0 using the command ng update @angular/cli @angular/core The compiler started to complain about error TS2305: Module '"@angular/router/router"' has no exported member 'QueryParamsHandling'.

I use this for importing the QueryParamsHandling interface πŸ‘

import { QueryParamsHandling} from '@angular/router/src/config';

Should I import it from else where ?

πŸ”₯ Exception or Error

error TS2305: Module '"@angular/router/router"' has no exported member 'QueryParamsHandling'.

🌍 Your Environment

Angular Version:

Angular CLI: 8.0.1
Node: 10.16.0
OS: win32 x64
Angular: 8.0.0
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, material, material-moment-adapter
... platform-browser, platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.1
@angular-devkit/build-angular     0.800.1
@angular-devkit/build-optimizer   0.800.1
@angular-devkit/build-webpack     0.800.1
@angular-devkit/core              7.3.8
@angular-devkit/schematics        7.3.8
@angular/cli                      8.0.1
@ngtools/webpack                  8.0.1
@schematics/angular               8.0.1
@schematics/update                0.800.1
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.30.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
efcoyotecommented, Jun 7, 2019

Imho, this is a bug. The property is flaged as part of the public API. But it’s missing in the index.ts. The rest of the NavigationExtras interface seems to be part of the API so it make no sense to hide property types.

2reactions
trotylcommented, Jun 3, 2019

We explicitly don’t consider the following to be our public API surface:

  • any file/import paths within our package except for the /, /testing and /bundles/* and other documented package entry-points.

https://github.com/angular/angular/blob/master/docs/PUBLIC_API.md

This is never a public API and should not work in any version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

path/node_modules/@angular/router/router"' has no exported ...
Go to @ angular / router / router "and insert the word 'export' before the QueryParamsHandling declaration: export declare typeΒ ...
Read more >
Deprecated APIs and features - Angular
Angular strives to balance innovation and stability. Sometimes, APIs and features become obsolete and need to be removed or replaced so that Angular...
Read more >
Module has no exported member typescript
Router doesn't export the QueryParamsHandling interface anymore #30816. Module '"@angular/router/router"' has no exported member 'QueryParamsHandling'.
Read more >
MOOC: Angular 2 - Services & DI & Routing | Note of Thi
Adding Routes; routerLink; Understand paths; routerLinkActive ... export class ... { ... However, with services, we don't need them anymore, just inject theΒ ......
Read more >
angular/angular - Gitter
export class AdmindashboardComponent implements OnInit ... just use the example, can't help you with this basic stuff anymore.. sry.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found