mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Expand hubot typings * Fix build issue * Fix tests for mattvperrys hubot pr * Update mattvperrys code after rebase * Remove redundant line
20 lines
554 B
TypeScript
20 lines
554 B
TypeScript
import * as Hubot from "hubot";
|
|
|
|
const robot = new Hubot.Robot<{}>(
|
|
'src/adapters',
|
|
'slack',
|
|
false,
|
|
'hubot',
|
|
);
|
|
robot; // $ExpectType Robot<{}>
|
|
robot.adapter; // $ExpectType {}
|
|
robot.hear(/hello/, () => null); // $ExpectType void
|
|
robot.on('test', () => null); // $ExpectType Robot<{}>
|
|
robot.emit('test', 'arg'); // $ExpectType boolean
|
|
|
|
const brain = new Hubot.Brain(robot);
|
|
brain; // $ExpectType Brain<{}>
|
|
brain.userForName('someone'); // $ExpectType User
|
|
brain.get('test'); // $ExpectType any
|
|
brain.set('test', 'test'); // $ExpectType Brain<{}>
|