"Fossies" - the Fresh Open Source Software Archive 
Member "cli-1.1260.0/packages/snyk-fix/src/plugins/types.ts" (4 Dec 2023, 796 Bytes) of package /linux/misc/snyk-cli-1.1260.0.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 import {
2 EntityToFix,
3 FixOptions,
4 WithError,
5 WithAttemptedFixChanges,
6 WithUserMessage,
7 } from '../types';
8
9 export type FixHandler = (
10 entities: EntityToFix[],
11 options: FixOptions,
12 ) => Promise<FixHandlerResultByPlugin>;
13
14 export type FailedToFix =
15 | WithAttemptedFixChanges<EntityToFix>
16 | WithError<EntityToFix>;
17
18 export function isWithError(r: FailedToFix): r is WithError<EntityToFix> {
19 return 'error' in r;
20 }
21
22 export interface PluginFixResponse {
23 succeeded: Array<WithAttemptedFixChanges<EntityToFix>>;
24 failed: FailedToFix[];
25 skipped: Array<WithUserMessage<EntityToFix>>;
26 }
27 export interface FixHandlerResultByPlugin {
28 [pluginId: string]: PluginFixResponse;
29 }
30
31 export interface FixedCache {
32 [filePath: string]: {
33 fixedIn: string;
34 issueIds: string[];
35 };
36 }