There is a class called 'Game' inside phaser.d.ts file inside node_modules/phaser.
I want to add an extra property 'GLOBAL' to the class 'Game' without touching node_modules.
how can I achieve it?
CodePudding user response:
You could use whats called augmentation which would look to something along the lines of :
// global.d.ts
declare module 'phaser' {
interface Game {
GLOBAL: any;
}
}
Hope that will help you