From 4678a1b1a3a02c52ff2e1942e6750dc3e66554de Mon Sep 17 00:00:00 2001 From: Simon Schick Date: Sat, 17 Feb 2018 21:31:59 +0100 Subject: [PATCH] undo boom changes, use correct path mapping --- types/catbox/index.d.ts | 14 +++++++------- types/hapi/definitions/util/lifecycle.d.ts | 2 +- types/yar/tsconfig.json | 5 +++++ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/types/catbox/index.d.ts b/types/catbox/index.d.ts index 9d84f2204f..826f1f7369 100644 --- a/types/catbox/index.d.ts +++ b/types/catbox/index.d.ts @@ -6,8 +6,8 @@ import * as Boom from 'boom'; -export type CallBackNoResult = (err?: Boom.Boom) => void; -export type CallBackWithResult = (err: Boom.Boom | null | undefined, result: T) => void; +export type CallBackNoResult = (err?: Boom.BoomError) => void; +export type CallBackWithResult = (err: Boom.BoomError | null | undefined, result: T) => void; /** * Client @@ -50,7 +50,7 @@ export class Client implements ClientApi { /** isReady() - returns true if cache engine determines itself as ready, false if it is not ready. */ isReady(): boolean; /** validateSegmentName(segment) - returns null if the segment name is valid (see below), otherwise should return an instance of Error with an appropriate message. */ - validateSegmentName(segment: string): null | Boom.Boom; + validateSegmentName(segment: string): null | Boom.BoomError; } export type EnginePrototypeOrObject = EnginePrototype | ClientApi; @@ -95,7 +95,7 @@ export interface ClientApi { /** isReady() - returns true if cache engine determines itself as ready, false if it is not ready. */ isReady(): boolean; /** validateSegmentName(segment) - returns null if the segment name is valid (see below), otherwise should return an instance of Error with an appropriate message. */ - validateSegmentName(segment: string): null | Boom.Boom; + validateSegmentName(segment: string): null | Boom.BoomError; } /** @@ -211,7 +211,7 @@ export interface PolicyAPI { * @param cached - null if a valid item was not found in the cache, or IPolicyGetCallbackCachedOptions * @param report - an object with logging information about the generation operation */ -export type PolicyGetCallback = (err: null | Boom.Boom, value: CacheItem, cached: PolicyGetCallbackCachedOptions, report: PolicyGetCallbackReportLog) => void; +export type PolicyGetCallback = (err: null | Boom.BoomError, value: CacheItem, cached: PolicyGetCallbackCachedOptions, report: PolicyGetCallbackReportLog) => void; export interface PolicyGetCallbackCachedOptions { /** item - the cached value. */ @@ -273,7 +273,7 @@ export interface PolicyOptions { * * ttl - the cache ttl value in milliseconds. Set to 0 to skip storing in the cache. Defaults to the cache global policy. * @see {@link https://github.com/hapijs/catbox#policy} */ -export type GenerateFunc = (id: string, next: ((err: null | Boom.Boom, value: CacheItem, ttl?: number) => void)) => void; +export type GenerateFunc = (id: string, next: ((err: null | Boom.BoomError, value: CacheItem, ttl?: number) => void)) => void; /** * An object with logging information about the generation operation containing the following keys (as relevant): @@ -288,7 +288,7 @@ export interface PolicyGetCallbackReportLog { /** ttl - the cache ttl value for the record. */ ttl: number; /** error - lookup error. */ - error?: Boom.Boom; + error?: Boom.BoomError; } /** diff --git a/types/hapi/definitions/util/lifecycle.d.ts b/types/hapi/definitions/util/lifecycle.d.ts index 4eda3733bd..35f347dcd5 100644 --- a/types/hapi/definitions/util/lifecycle.d.ts +++ b/types/hapi/definitions/util/lifecycle.d.ts @@ -36,7 +36,7 @@ export namespace Lifecycle { export type ReturnValueTypes = (null | string | number | boolean) | (Buffer) | - (Error | Boom.Boom) | + (Error | Boom.BoomError) | (stream.Stream) | (object | object[]) | Object | diff --git a/types/yar/tsconfig.json b/types/yar/tsconfig.json index c2723ded55..3843d1296e 100644 --- a/types/yar/tsconfig.json +++ b/types/yar/tsconfig.json @@ -13,6 +13,11 @@ "../" ], "types": [], + "paths": { + "boom": [ + "boom/v4" + ] + }, "noEmit": true, "forceConsistentCasingInFileNames": true },