> = new (...args: any[]) => T;
export type InspectedClass = any;
export type NodeInspectContext = typeof inspect.defaultOptions & {
stylize(text: string, color: string): string;
};
export interface IInspectableContext {
stylize: (text: string, color: 'special' | 'string') => string;
inspect: (payload: P, options?: {
compact?: boolean;
}) => string;
}
export type InspectableSerialize = (instance: T) => P;
export type InspectableStringify = (instance: T, payload: P, context: IInspectableContext) => string;
export interface IInspectableOptions {
serialize?: InspectableSerialize;
stringify?: InspectableStringify;
}
export interface IInspectOptions {
/**
* Should we **compute** the value if it is a function?
* @default false
*/
compute?: boolean;
/**
* Should we output the value if it is nullable?
* @default true
*/
nullable?: boolean;
/**
* Replaces the property name with an alias in the output
*/
as?: string;
}
export type IInspectNormalizedOptions = Required;
export interface IInspectableMetadata {
property: string;
options: IInspectOptions;
}