From 95c06982ebea38a2dfcb65a69bed021c817fc42f Mon Sep 17 00:00:00 2001 From: Gareth Parker Date: Sat, 24 Mar 2018 09:57:13 +0000 Subject: [PATCH] Fixing build --- .../glue/{hapi-glue-test.ts => glue-tests.ts} | 4 +- types/glue/index.d.ts | 54 +++++++++---------- types/glue/tsconfig.json | 2 +- 3 files changed, 28 insertions(+), 32 deletions(-) rename types/glue/{hapi-glue-test.ts => glue-tests.ts} (90%) diff --git a/types/glue/hapi-glue-test.ts b/types/glue/glue-tests.ts similarity index 90% rename from types/glue/hapi-glue-test.ts rename to types/glue/glue-tests.ts index 2d34fdb489..7ac309352c 100644 --- a/types/glue/hapi-glue-test.ts +++ b/types/glue/glue-tests.ts @@ -15,6 +15,6 @@ const manifest: Glue.Manifest = { } ] } -} +}; -Glue.compose(manifest); \ No newline at end of file +Glue.compose(manifest); diff --git a/types/glue/index.d.ts b/types/glue/index.d.ts index 5f40ba924b..e7f12c7a68 100644 --- a/types/glue/index.d.ts +++ b/types/glue/index.d.ts @@ -1,35 +1,31 @@ // Type definitions for glue // Project: https://github.com/hapijs/glue -// Definitions by: Gareth Parker +// Definitions by: Gareth Parker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.7 -declare module "glue" { - - import { Server, ServerOptions } from "hapi"; - - export interface Options { - relativeTo: string; - preConnections?: (Server:Server, next:(err:any)=>void ) => void; - preRegister?: (Server:Server, next:(err:any)=>void ) => void; - } - - interface Plugin { - plugin: string | { - register:string; - options?:any; - }; - options?: any; - routes?: any - } - - interface Manifest { - server: ServerOptions; - register?: { - plugins: Array - } - } - - export function compose(manifest: Manifest, options?: Options): Server; +import { Server, ServerOptions } from "hapi"; +export interface Options { + relativeTo: string; + preConnections?: (Server:Server, next:(err:any)=>void ) => void; + preRegister?: (Server:Server, next:(err:any)=>void ) => void; } + +interface Plugin { + plugin: string | { + register:string; + options?:any; + }; + options?: any; + routes?: any +} + +interface Manifest { + server: ServerOptions; + register?: { + plugins: Array + } +} + +export function compose(manifest: Manifest, options?: Options): Server; + diff --git a/types/glue/tsconfig.json b/types/glue/tsconfig.json index f2d4fcee28..2d9b76b8f7 100644 --- a/types/glue/tsconfig.json +++ b/types/glue/tsconfig.json @@ -21,6 +21,6 @@ }, "files": [ "index.d.ts", - "hapi-glue-test.ts" + "glue-tests.ts" ] } \ No newline at end of file