Fix type checks.

This commit is contained in:
Sam Rose 2024-02-28 17:46:16 +00:00
parent d9cffa1878
commit e309282ff7
No known key found for this signature in database
2 changed files with 4 additions and 6 deletions

View File

@ -4,11 +4,6 @@ import { ReadStream } from "fs"
type Headers = Record<string, string | string[] | undefined>
export interface TestAPIOpts {
headers?: Headers
status?: number
}
export interface AttachedFile {
name: string
file: Buffer | ReadStream | string

View File

@ -22,7 +22,10 @@ export class TableAPI extends TestAPI {
return await this._get<Table[]>("/api/tables", { expectations })
}
get = async (tableId: string, expectations: Expectations): Promise<Table> => {
get = async (
tableId: string,
expectations?: Expectations
): Promise<Table> => {
return await this._get<Table>(`/api/tables/${tableId}`, { expectations })
}