mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-14 09:02:40 +08:00
undo boom changes, use correct path mapping
This commit is contained in:
14
types/catbox/index.d.ts
vendored
14
types/catbox/index.d.ts
vendored
@@ -6,8 +6,8 @@
|
||||
|
||||
import * as Boom from 'boom';
|
||||
|
||||
export type CallBackNoResult = (err?: Boom.Boom) => void;
|
||||
export type CallBackWithResult<T> = (err: Boom.Boom | null | undefined, result: T) => void;
|
||||
export type CallBackNoResult = (err?: Boom.BoomError) => void;
|
||||
export type CallBackWithResult<T> = (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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
2
types/hapi/definitions/util/lifecycle.d.ts
vendored
2
types/hapi/definitions/util/lifecycle.d.ts
vendored
@@ -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 |
|
||||
|
||||
@@ -13,6 +13,11 @@
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"paths": {
|
||||
"boom": [
|
||||
"boom/v4"
|
||||
]
|
||||
},
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user