Skip to content

Commit aea9777

Browse files
refactor(types): replace Record with mapped types
1 parent 9fb9bdd commit aea9777

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

src/resources/workbooks.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,9 @@ export interface WorkbookListResponse {
203203
/**
204204
* Response type returned by the for /calc query endpoint.
205205
*/
206-
export type WorkbookCalcResponse = Record<
207-
string,
208-
WorkbookCalcResponse.ReadValue | Array<WorkbookCalcResponse.UnionMember1>
209-
>;
206+
export type WorkbookCalcResponse = {
207+
[key: string]: WorkbookCalcResponse.ReadValue | Array<WorkbookCalcResponse.UnionMember1>;
208+
};
210209

211210
export namespace WorkbookCalcResponse {
212211
export interface ReadValue {
@@ -434,17 +433,16 @@ export interface WorkbookUploadResponse {
434433
/**
435434
* Response type returned by the for /values query endpoint.
436435
*/
437-
export type WorkbookValuesResponse = Record<
438-
string,
439-
number | number | string | boolean | null | Array<number | string | boolean | null>
440-
>;
436+
export type WorkbookValuesResponse = {
437+
[key: string]: number | number | string | boolean | null | Array<number | string | boolean | null>;
438+
};
441439

442440
export interface WorkbookListParams extends CursorPaginationParams {}
443441

444442
export interface WorkbookCalcParams {
445443
read: Array<string>;
446444

447-
apply?: Record<string, number | string | boolean | null> | null;
445+
apply?: { [key: string]: number | string | boolean | null } | null;
448446
}
449447

450448
export interface WorkbookExportParams {
@@ -942,7 +940,7 @@ export interface WorkbookUploadParams {
942940
export interface WorkbookValuesParams {
943941
read: Array<string>;
944942

945-
apply?: Record<string, number | string | boolean | null> | null;
943+
apply?: { [key: string]: number | string | boolean | null } | null;
946944
}
947945

948946
export declare namespace Workbooks {

0 commit comments

Comments
 (0)