The hubot
type definitions contain the following class:
declare namespace Hubot {
// ...
class Message {
user: User;
text: string;
id: string;
}
// ...
}
// Compatibility with CommonJS syntax exported by Hubot's CoffeeScript.
// tslint:disable-next-line export-just-namespace
export = Hubot;
export as namespace Hubot;
I am looking to extend the Message
class within my code, in a file called hubot.d.ts
:
import * as hubot from 'hubot';
declare namespace Hubot {
export class Message {
mentions: string[]
}
}
However, it is not functioning as expected: https://i.sstatic.net/ox5DM.png
The hubot.d.ts
file has been included in the code through
"files": ["types/custom/hubot.d.ts"]
In the tsconfig.json
file.
What am I overlooking? Is there another approach I should consider?