From cf8f7b978792800ea9d527b0cfdef71cae962575 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Mon, 12 Oct 2026 10:27:31 +0100 Subject: [PATCH] Add `ActionConfig` type --- src/config/action-config.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/config/action-config.ts b/src/config/action-config.ts index de6882e77..fcb6a9482 100644 --- a/src/config/action-config.ts +++ b/src/config/action-config.ts @@ -126,3 +126,19 @@ export interface Config { */ enableFileCoverageInformation: boolean; } + +/** Properties available in `Config`. */ +export type ActionConfigProperties = keyof Config; + +/** + * The CodeQL Action configuration state that is persisted + * between steps of the CodeQL Action in a CodeQL workflow. + * + * By default, this is equivalent to `Config`. By explicitly + * providing required property names for `T` this can be restricted + * to requiring only those. For example, in `ActionConfig<"codeqlCmd">` + * all properties except `codeqlCmd` are optional. + */ +export type ActionConfig< + T extends ActionConfigProperties = ActionConfigProperties, +> = Partial & Pick;