Improve type safety by using more specific function types

This commit is contained in:
Henry Mercer 2024-06-13 19:26:45 +01:00
parent 2e69043274
commit d8f549d6d8
9 changed files with 21 additions and 14 deletions

View file

@ -81,7 +81,7 @@ function createConfigFile(inputFileContents: string, tmpDir: string): string {
return configFilePath;
}
type GetContentsResponse = { content?: string } | Array<{}>;
type GetContentsResponse = { content?: string } | object[];
function mockGetContents(
content: GetContentsResponse,