Add typings for js-yaml

This commit is contained in:
Andrew Eisenberg 2022-06-13 15:36:52 -07:00
parent 29a2159db1
commit 0efcf74ce0
16 changed files with 289 additions and 21 deletions

View file

@ -191,7 +191,7 @@ interface WorkflowTriggers {
pull_request?: WorkflowTrigger | null;
}
interface Workflow {
export interface Workflow {
jobs?: { [key: string]: WorkflowJob };
on?: string | string[] | WorkflowTriggers;
}
@ -411,7 +411,7 @@ export async function getWorkflow(): Promise<Workflow> {
relativePath
);
return yaml.load(fs.readFileSync(absolutePath, "utf-8"));
return yaml.load(fs.readFileSync(absolutePath, "utf-8")) as Workflow;
}
/**