I'm in the process of enhancing existing hapi definitions by incorporating a new type, specifically the seneca type. Here's an example:
interface SenecaMethods {
act: any;
add: any;
}
interface HapiServer extends Hapi.Server {
info: any;
seneca: SenecaMethods;
}
const server: HapiServer = new Hapi.Server();
An error occurs stating that Server is not assignable to HapiServer, with the property 'seneca' missing in type server.
How can I successfully add seneca methods to Hapi.Server without making it optional?