diff --git a/hapi/hapi-tests.ts b/hapi/hapi-tests.ts index 0589036371..c0f8d9f6e0 100644 --- a/hapi/hapi-tests.ts +++ b/hapi/hapi-tests.ts @@ -21,6 +21,12 @@ plugin.register.attributes = { version: "1.0.0" }; +// optional options parameter +server.register({}, function (err) {}); + +// optional options.routes.vhost parameter +server.register({}, { select: 'api', routes: { prefix: '/prefix' } }, function (err) {}); + //server.pack.register(plugin, (err: Object) => { // if (err) { throw err; } //}); diff --git a/hapi/hapi.d.ts b/hapi/hapi.d.ts index 61a2ef2d5a..be2bf9665b 100644 --- a/hapi/hapi.d.ts +++ b/hapi/hapi.d.ts @@ -2051,11 +2051,13 @@ declare module "hapi" { register(plugins: any|any[], options: { select: string|string[]; routes: { - prefix: string; vhost: string|string[] + prefix: string; vhost?: string|string[] }; } , callback: (err: any) => void):void; + register(plugins: any|any[], callback: (err: any) => void):void; + /**server.render(template, context, [options], callback) Utilizes the server views manager to render a template where: template - the template filename and path, relative to the views manager templates path (path or relativeTo).