Skip to content

NzDrawerComponent Type Definition error #7620

Description

@merih-sakarya

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-ivy-kotjtq

Steps to reproduce

I am upgrading to version 14. However, the Drawer Component gives an error during the build.

What is expected?

Property 'nzContentParams' in type 'NzDrawerComponent<T, R, D>' is not assignable to the same property in base type 'NzDrawerOptionsOfComponent<any, any>'.

What is actually happening?

Error: node_modules/ng-zorro-antd/drawer/drawer.component.d.ts:73:5 - error TS2416: Property 'nzContentParams' in type 'NzDrawerComponent<T, R, D>' is not assignable to the same property in base type 'NzDrawerOptionsOfComponent<any, any>'.
  Type 'D | undefined' is not assignable to type 'Partial<any> | undefined'.
    Type 'D' is not assignable to type 'Partial<any> | undefined'.
      Type 'D' is not assignable to type 'Partial<any>'.

73     nzContentParams?: D;
       ~~~~~~~~~~~~~~~

  node_modules/ng-zorro-antd/drawer/drawer.component.d.ts:17:70
    17 export declare class NzDrawerComponent<T = NzSafeAny, R = NzSafeAny, D = NzSafeAny> extends NzDrawerRef<T, R> implements OnInit, OnDestroy, AfterViewInit, OnChanges, NzDrawerOptionsOfComponent {
                                                                            ~~~~~~~~~~~~~
    This type parameter might need an `extends Partial<any>` constraint.
  node_modules/ng-zorro-antd/drawer/drawer.component.d.ts:17:70
    17 export declare class NzDrawerComponent<T = NzSafeAny, R = NzSafeAny, D = NzSafeAny> extends NzDrawerRef<T, R> implements OnInit, OnDestroy, AfterViewInit, OnChanges, NzDrawerOptionsOfComponent {
                                                                            ~~~~~~~~~~~~~
    This type parameter might need an `extends Partial<any> | undefined` constraint.
Environment Info
ng-zorro-antd 14.0.0
Browser Chrome

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions