Skip to content

Commit ed9a1da

Browse files
committed
Add ActionConfig type
1 parent d9f462b commit ed9a1da

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎src/config/action-config.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,19 @@ export interface Config {
126126
*/
127127
enableFileCoverageInformation: boolean;
128128
}
129+
130+
/** Properties available in `Config`. */
131+
export type ActionConfigProperties = keyof Config;
132+
133+
/**
134+
* The CodeQL Action configuration state that is persisted
135+
* between steps of the CodeQL Action in a CodeQL workflow.
136+
*
137+
* By default, this is equivalent to `Config`. By explicitly
138+
* providing required property names for `T` this can be restricted
139+
* to requiring only those. For example, in `ActionConfig<"codeqlCmd">`
140+
* all properties except `codeqlCmd` are optional.
141+
*/
142+
export type ActionConfig<
143+
T extends ActionConfigProperties = ActionConfigProperties,
144+
> = Partial<Config> & Pick<Config, T>;

0 commit comments

Comments
 (0)