# How to use rexplugins in type scripts

**URL:** <https://phaser.discourse.group/t/how-to-use-rexplugins-in-type-scripts/13081>\
**Category:** Phaser 3\
**Created:** [March 31, 2023, 3:25pm UTC](https://phaser.discourse.group/t/how-to-use-rexplugins-in-type-scripts/13081 "2023-03-31T15:25:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShinByoungWoo](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/shinbyoungwoo/32/7494_2.png) [@ShinByoungWoo](https://phaser.discourse.group/u/ShinByoungWoo)\
**Post date:** [March 31, 2023, 3:25pm UTC](https://phaser.discourse.group/t/how-to-use-rexplugins-in-type-scripts/13081/1 "2023-03-31T15:25:04Z")

</div>

![화면 캡처 2023-03-31 121053](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/1/1858e261373500866157ec03b934027e448c579a.png)  
If you use it with spine plugin like the picture above, an error occurs like the image below, so please tell me how to solve it

![화면 캡처 2023-03-31 121518](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/b/b3e3120353eca100e14ee89218499aadf0bed0a3.png)

Is there any more code I need to add to index.d.ts

---

<div class="post-metadata">

**Author:** ![rexrainbow](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/rexrainbow/32/51_2.png) [@rexrainbow](https://phaser.discourse.group/u/rexrainbow)\
**Post date:** [March 31, 2023, 5:10pm UTC](https://phaser.discourse.group/t/how-to-use-rexplugins-in-type-scripts/13081/2 "2023-03-31T17:10:44Z")

</div>

TagText plugin is not a scene plugin, it is a global plugin ([ref](https://rexrainbow.github.io/phaser3-rex-notes/docs/site/tagtext/#import-plugin))

```js
import TagTextPlugin from 'phaser3-rex-plugins/plugins/tagtext-plugin.js';
var config = {
    // ...
    plugins: {
        global: [{
            key: 'rexTagTextPlugin',
            plugin: TagTextPlugin,
            start: true
        },
        // ...
        ]
    }
    // ...
};
var game = new Phaser.Game(config)

```

Since you are using typescript, you can import TagText class directly. ([ref](https://rexrainbow.github.io/phaser3-rex-notes/docs/site/tagtext/#import-class))

```js
import TagText from 'phaser3-rex-plugins/plugins/tagtext.js';

//....
var txt = new TagText(scene, x, y, content, config);
scene.add.existing(txt);

```

In this solution, you can load d.ts from `phaser3-rex-plugins/plugins/tagtext.d.ts`

---

<div class="post-metadata">

**Author:** ![ShinByoungWoo](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/shinbyoungwoo/32/7494_2.png) [@ShinByoungWoo](https://phaser.discourse.group/u/ShinByoungWoo)\
**Post date:** [April 4, 2023, 10:01am UTC](https://phaser.discourse.group/t/how-to-use-rexplugins-in-type-scripts/13081/3 "2023-04-04T10:01:47Z")

</div>

oh rex!  
Thank you for your direct reply

However, even if you modify it to a global plug-in  
There seems to be a conflict with the Spile Plug-in.

 ![에러0](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/b/ba9818e79fd2153a624cb1b137283f56bf4ee4dc.png)  
 ![에러1](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/3/3497ab6d13d974ced532bf66128cbd1945d20a37.png)

Is there any other way?

---

<div class="post-metadata">

**Author:** ![rexrainbow](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/rexrainbow/32/51_2.png) [@rexrainbow](https://phaser.discourse.group/u/rexrainbow)\
**Post date:** [April 6, 2023, 2:36am UTC](https://phaser.discourse.group/t/how-to-use-rexplugins-in-type-scripts/13081/4 "2023-04-06T02:36:16Z")

</div>

No idea, TagText plugin won’t reference to spine plugin, i.e. they are independent imo.
