diff --git a/tests/__snapshots__/tsnapi/@devframes/plugin-code-server/node.snapshot.d.ts b/tests/__snapshots__/tsnapi/@devframes/plugin-code-server/node.snapshot.d.ts index bcdd71ab..43c1b35f 100644 --- a/tests/__snapshots__/tsnapi/@devframes/plugin-code-server/node.snapshot.d.ts +++ b/tests/__snapshots__/tsnapi/@devframes/plugin-code-server/node.snapshot.d.ts @@ -141,7 +141,7 @@ export declare const diagnostics: Diagnostics<{ }; }, readonly [(d: Diagnostic, { method }?: { method?: "log" | "warn" | "error"; -}) => void]>; +}) => void], never>; // #endregion // #region Referenced (internal) @@ -150,17 +150,18 @@ interface DetectCodeServerResult { version?: string; bin: string; } -declare class Diagnostic extends Error { +declare class Diagnostic extends Error { name: string; code: string; docs?: string; fix?: string; sources?: string[]; + data: Data; get why(): string; - constructor(_: DiagnosticInit, _?: Function); - toJSON(): object; + constructor(_: DiagnosticInit, _?: StackTraceFrame); + toJSON(): DiagnosticJSON; } -type Diagnostics, Reporters extends readonly AnyDiagnosticReporter[]> = { [Code in keyof Codes]: DiagnosticHandle, Prettify>>; }; +type Diagnostics, Reporters extends readonly AnyDiagnosticReporter[], DataOverride = never> = { [Code in keyof Codes]: DiagnosticHandle, Prettify>, [DataOverride] extends [never] ? InferCodeData : DataOverride>; }; interface ProfileContext { host: string; port: number; diff --git a/tests/__snapshots__/tsnapi/@devframes/plugin-terminals/node.snapshot.d.ts b/tests/__snapshots__/tsnapi/@devframes/plugin-terminals/node.snapshot.d.ts index aac6545f..757bcd74 100644 --- a/tests/__snapshots__/tsnapi/@devframes/plugin-terminals/node.snapshot.d.ts +++ b/tests/__snapshots__/tsnapi/@devframes/plugin-terminals/node.snapshot.d.ts @@ -90,19 +90,20 @@ export declare const diagnostics: Diagnostics<{ }; }, readonly [(d: Diagnostic, { method }?: { method?: "log" | "warn" | "error"; -}) => void]>; +}) => void], never>; // #endregion // #region Referenced (internal) -declare class Diagnostic extends Error { +declare class Diagnostic extends Error { name: string; code: string; docs?: string; fix?: string; sources?: string[]; + data: Data; get why(): string; - constructor(_: DiagnosticInit, _?: Function); - toJSON(): object; + constructor(_: DiagnosticInit, _?: StackTraceFrame); + toJSON(): DiagnosticJSON; } -type Diagnostics, Reporters extends readonly AnyDiagnosticReporter[]> = { [Code in keyof Codes]: DiagnosticHandle, Prettify>>; }; +type Diagnostics, Reporters extends readonly AnyDiagnosticReporter[], DataOverride = never> = { [Code in keyof Codes]: DiagnosticHandle, Prettify>, [DataOverride] extends [never] ? InferCodeData : DataOverride>; }; // #endregion \ No newline at end of file diff --git a/tests/__snapshots__/tsnapi/devframe/internal.snapshot.d.ts b/tests/__snapshots__/tsnapi/devframe/internal.snapshot.d.ts index 34d143dd..4c08e1e9 100644 --- a/tests/__snapshots__/tsnapi/devframe/internal.snapshot.d.ts +++ b/tests/__snapshots__/tsnapi/devframe/internal.snapshot.d.ts @@ -373,7 +373,7 @@ export declare const diagnostics: import("nostics").Diagnostics<{ }; }, readonly [(d: import("nostics").Diagnostic, { method }?: { method?: "log" | "warn" | "error"; -}) => void]>; +}) => void], never>; // #endregion // #region Other