forked from microsoft/security-devops-action
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmsdo-interface.ts
More file actions
29 lines (27 loc) · 1.07 KB
/
Copy pathmsdo-interface.ts
File metadata and controls
29 lines (27 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
* Interface for the MicrosoftSecurityDevOps task
*/
export interface IMicrosoftSecurityDevOps {
readonly succeedOnError: boolean;
/* param source - The source of the task: main, pre, or post. */
runPreJob(): any;
runMain(): any;
runPostJob(): any;
}
/**
* Factory interface for creating instances of the `IMicrosoftSecurityDevOps` interface.
* This factory enforces the inputs that can be used for creation of the `IMicrosoftSecurityDevOps` instances.
*/
export interface IMicrosoftSecurityDevOpsFactory {
new (): IMicrosoftSecurityDevOps;
}
/**
* Returns an instance of IMicrosoftSecurityDevOps based on the input runner and command type.
* (This is used to enforce strong typing for the inputs for the runner).
* @param runner - The runner to use to create the instance of IMicrosoftSecurityDevOps.
* @param commandType - The input command type.
* @returns An instance of IMicrosoftSecurityDevOps.
*/
export function getExecutor(runner: IMicrosoftSecurityDevOpsFactory): IMicrosoftSecurityDevOps {
return new runner();
}