Use closure in trailing position and strongly type header map

This commit is contained in:
Matthias Einwag 2020-09-23 08:24:35 -07:00
parent 87933e15ce
commit d38f759c63
2 changed files with 21 additions and 18 deletions

View file

@ -28,7 +28,7 @@ export async function fetchRelease(
log.debug("Issuing request for released artifacts metadata to", requestUrl);
var headers: any = { Accept: "application/vnd.github.v3+json" };
const headers: Record<string, string> = { Accept: "application/vnd.github.v3+json" };
if (githubToken != null) {
headers.Authorization = "token " + githubToken;
}