Improve type safety by using more specific function types
This commit is contained in:
parent
2e69043274
commit
d8f549d6d8
9 changed files with 21 additions and 14 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue