proyecto26 / ion-phaser

A web component to use Phaser Framework with Angular, React, Vue, etc 🎮
https://market.ionicframework.com/plugins/ionphaser
MIT License
251 stars 39 forks source link

Conflicts when using typescript #8

Closed yyf401238353 closed 4 years ago

yyf401238353 commented 4 years ago

It seems like your code in @ion-phaser/react/dist/types/components/IonPhaser.d.ts overwrites the JSX in @type/react.

yyf401238353 commented 4 years ago
declare module "react" {
    namespace JSX {
        interface IntrinsicElements {
            'ion-phaser': any;
        }
    }
}
jdnichollsc commented 4 years ago

Yes here https://github.com/proyecto26/ion-phaser/blob/master/react/src/components/IonPhaser.tsx#L4

jdnichollsc commented 4 years ago

oh ok, we need to replace that by using global instead:

declare global {
  namespace JSX {
    interface IntrinsicElements {
      'ion-phaser': any;
    }
  }
}
jdnichollsc commented 4 years ago

Fixed, check the last version 1.2.1! 👍