Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Types of property 'serialize' are incompatible #235

@pszalanski

Description

@pszalanski

I am getting an error after setting up query parameter bindings:

Types of property 'serialize' are incompatible.
    Type 'ParamSerializer<string | null>' is not assignable to type 'ParamSerializer<unknown>'.
      Type 'unknown' is not assignable to type 'string | null'.

21                  [queryParam]="searchParam">
                     ~~~~~~~~~~

  src/app/pages/component.ts:11:16
    11   templateUrl: './component.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component Component.

This is the setup of the parameter:

class Component {
  searchParam: QueryParam<string>;

  constructor() {
    this.searchParam = qb.stringParam('search');
  }

I followed the example in the documentation.

My node_modules:

+-- __ngcc_entry_points__.json@ extraneous
+-- @angular-builders/[email protected]
+-- @angular-devkit/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @azure/[email protected]
+-- @azure/[email protected]
+-- @ngneat/[email protected]
+-- @ngneat/[email protected]
+-- @ngneat/[email protected]
+-- @ngqp/[email protected]
+-- @testing-library/[email protected]
+-- @testing-library/[email protected]
+-- @testing-library/[email protected]
+-- @types/[email protected]
+-- @types/[email protected]
+-- @types/[email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions