Skip to content

bug: Interface 'HTMLIonIconElement' cannot simultaneously extend types 'IonIcon' and 'IonIcon' #20208

Closed
@ildar-icoosoft

Description

@ildar-icoosoft

Bug Report

Ionic version:

[x] 4.x

Current behavior:

I'm trying to use Ionic components in my angular library (npm module). I've created the angular library using this manual. Then I've installed @ionic/angular to package.json dependencies. And if I import anything from "@ionic/angular" (for example "import { IonicModule } from "@ionic/angular";") I'm getting many errors like this in "node_modules/ionicons/dist/types/components.d.ts(63,13):":

TS2320: Interface 'HTMLIonIconElement' cannot simultaneously extend types 'IonIcon' and 'IonIcon'.
 Named property ''icon'' of types 'IonIcon' and 'IonIcon' are not identical.

TS2320: Interface 'HTMLIonIconElement' cannot simultaneously extend types 'HTMLStencilElement' and 'HTMLStencilElement'.
  Named property 'forceUpdate' of types 'HTMLStencilElement' and 'HTMLStencilElement' are not identical.

Expected behavior:

import should not cause errors

Steps to reproduce:

  1. Generate new angular library:
ng new my-workspace --create-application=false
cd my-workspace
ng generate library my-lib
  1. install "@ionic/angular" module in the library
npm i @ionic/angular --save
  1. import anything from @ionic/angular:
import { IonicModule } from "@ionic/angular";

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: replythe issue needs a response from the user

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions