Skip to content

Commit 3e3b491

Browse files
authored
test: refresh diagnostic API snapshots (#412)
1 parent 9aa752a commit 3e3b491

3 files changed

Lines changed: 13 additions & 11 deletions

File tree

‎tests/__snapshots__/tsnapi/@devframes/plugin-code-server/node.snapshot.d.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export declare const diagnostics: Diagnostics<{
141141
};
142142
}, readonly [(d: Diagnostic, { method }?: {
143143
method?: "log" | "warn" | "error";
144-
}) => void]>;
144+
}) => void], never>;
145145
// #endregion
146146

147147
// #region Referenced (internal)
@@ -150,17 +150,18 @@ interface DetectCodeServerResult {
150150
version?: string;
151151
bin: string;
152152
}
153-
declare class Diagnostic extends Error {
153+
declare class Diagnostic<Data = undefined> extends Error {
154154
name: string;
155155
code: string;
156156
docs?: string;
157157
fix?: string;
158158
sources?: string[];
159+
data: Data;
159160
get why(): string;
160-
constructor(_: DiagnosticInit, _?: Function);
161-
toJSON(): object;
161+
constructor(_: DiagnosticInit<Data>, _?: StackTraceFrame);
162+
toJSON(): DiagnosticJSON<Data>;
162163
}
163-
type Diagnostics<Codes extends Record<string, DiagnosticDefinition>, Reporters extends readonly AnyDiagnosticReporter[]> = { [Code in keyof Codes]: DiagnosticHandle<InferCodeParams<Codes[Code]>, Prettify<ExtractReportersOptions<Reporters>>>; };
164+
type Diagnostics<Codes extends Record<string, DiagnosticDefinition>, Reporters extends readonly AnyDiagnosticReporter[], DataOverride = never> = { [Code in keyof Codes]: DiagnosticHandle<InferCodeParams<Codes[Code]>, Prettify<ExtractReportersOptions<Reporters>>, [DataOverride] extends [never] ? InferCodeData<Codes[Code]> : DataOverride>; };
164165
interface ProfileContext {
165166
host: string;
166167
port: number;

‎tests/__snapshots__/tsnapi/@devframes/plugin-terminals/node.snapshot.d.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,20 @@ export declare const diagnostics: Diagnostics<{
9090
};
9191
}, readonly [(d: Diagnostic, { method }?: {
9292
method?: "log" | "warn" | "error";
93-
}) => void]>;
93+
}) => void], never>;
9494
// #endregion
9595

9696
// #region Referenced (internal)
97-
declare class Diagnostic extends Error {
97+
declare class Diagnostic<Data = undefined> extends Error {
9898
name: string;
9999
code: string;
100100
docs?: string;
101101
fix?: string;
102102
sources?: string[];
103+
data: Data;
103104
get why(): string;
104-
constructor(_: DiagnosticInit, _?: Function);
105-
toJSON(): object;
105+
constructor(_: DiagnosticInit<Data>, _?: StackTraceFrame);
106+
toJSON(): DiagnosticJSON<Data>;
106107
}
107-
type Diagnostics<Codes extends Record<string, DiagnosticDefinition>, Reporters extends readonly AnyDiagnosticReporter[]> = { [Code in keyof Codes]: DiagnosticHandle<InferCodeParams<Codes[Code]>, Prettify<ExtractReportersOptions<Reporters>>>; };
108+
type Diagnostics<Codes extends Record<string, DiagnosticDefinition>, Reporters extends readonly AnyDiagnosticReporter[], DataOverride = never> = { [Code in keyof Codes]: DiagnosticHandle<InferCodeParams<Codes[Code]>, Prettify<ExtractReportersOptions<Reporters>>, [DataOverride] extends [never] ? InferCodeData<Codes[Code]> : DataOverride>; };
108109
// #endregion

‎tests/__snapshots__/tsnapi/devframe/internal.snapshot.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ export declare const diagnostics: import("nostics").Diagnostics<{
373373
};
374374
}, readonly [(d: import("nostics").Diagnostic, { method }?: {
375375
method?: "log" | "warn" | "error";
376-
}) => void]>;
376+
}) => void], never>;
377377
// #endregion
378378

379379
// #region Other

0 commit comments

Comments
 (0)