@@ -144,7 +144,7 @@ export function setupTests(test: TestFn<any>) {
144144 * environment. Tests can override individual variables by passing them in the
145145 * `overrides` parameter.
146146 */
147- export const DEFAULT_ACTIONS_VARS : Record < string , string > = {
147+ export const DEFAULT_ACTIONS_VARS = {
148148 GITHUB_ACTION_REPOSITORY : "github/codeql-action" ,
149149 GITHUB_API_URL : "https://api.github.com" ,
150150 GITHUB_EVENT_NAME : "push" ,
@@ -157,14 +157,14 @@ export const DEFAULT_ACTIONS_VARS: Record<string, string> = {
157157 GITHUB_SHA : "0" . repeat ( 40 ) ,
158158 GITHUB_WORKFLOW : "test-workflow" ,
159159 RUNNER_OS : "Linux" ,
160- } ;
160+ } as const satisfies Record < string , string > ;
161161
162162// Sets environment variables that make using some libraries designed for
163163// use only on actions safe to use outside of actions.
164164export function setupActionsVars (
165165 tempDir : string ,
166166 toolsDir : string ,
167- overrides ?: Partial < Record < string , string > > ,
167+ overrides ?: Partial < Record < keyof typeof DEFAULT_ACTIONS_VARS , string > > ,
168168) {
169169 const vars = { ...DEFAULT_ACTIONS_VARS , ...overrides } ;
170170 for ( const [ key , value ] of Object . entries ( vars ) ) {
0 commit comments