Skip to content

Commit 19cc4e9

Browse files
stainless-app[bot]yjp20
authored andcommitted
refactor(types): replace Record with mapped types
1 parent fc4611c commit 19cc4e9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/resources/builds/builds.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ export interface BuildCreateParams {
381381
* Specifies what to build: a branch name, commit SHA, merge command
382382
* ("base..head"), or file contents
383383
*/
384-
revision: string | Record<string, BuildCreateParams.Content | BuildCreateParams.URL>;
384+
revision: string | { [key: string]: BuildCreateParams.Content | BuildCreateParams.URL };
385385

386386
/**
387387
* Whether to allow empty commits (no changes). Defaults to false.
@@ -458,7 +458,7 @@ export interface BuildListParams {
458458
/**
459459
* A config commit SHA used for the build
460460
*/
461-
revision?: string | Record<string, BuildListParams.unnamed_schema_with_map_parent_0>;
461+
revision?: string | { [key: string]: BuildListParams.unnamed_schema_with_map_parent_0 };
462462
}
463463

464464
export namespace BuildListParams {
@@ -513,7 +513,7 @@ export namespace BuildCompareParams {
513513
/**
514514
* Specifies what to build: a branch name, a commit SHA, or file contents
515515
*/
516-
revision: string | Record<string, Base.Content | Base.URL>;
516+
revision: string | { [key: string]: Base.Content | Base.URL };
517517

518518
/**
519519
* Optional branch to use. If not specified, defaults to "main". When using a
@@ -550,7 +550,7 @@ export namespace BuildCompareParams {
550550
/**
551551
* Specifies what to build: a branch name, a commit SHA, or file contents
552552
*/
553-
revision: string | Record<string, Head.Content | Head.URL>;
553+
revision: string | { [key: string]: Head.Content | Head.URL };
554554

555555
/**
556556
* Optional branch to use. If not specified, defaults to "main". When using a

src/resources/projects/configs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class Configs extends APIResource {
2929
/**
3030
* Config files contents
3131
*/
32-
export type ConfigRetrieveResponse = Record<string, ConfigRetrieveResponse.item>;
32+
export type ConfigRetrieveResponse = { [key: string]: ConfigRetrieveResponse.item };
3333

3434
export namespace ConfigRetrieveResponse {
3535
export interface item {
@@ -43,7 +43,7 @@ export namespace ConfigRetrieveResponse {
4343
/**
4444
* Config files contents
4545
*/
46-
export type ConfigGuessResponse = Record<string, ConfigGuessResponse.item>;
46+
export type ConfigGuessResponse = { [key: string]: ConfigGuessResponse.item };
4747

4848
export namespace ConfigGuessResponse {
4949
export interface item {

src/resources/projects/projects.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export interface ProjectCreateParams {
187187
/**
188188
* File contents to commit
189189
*/
190-
revision: Record<string, ProjectCreateParams.Content | ProjectCreateParams.URL>;
190+
revision: { [key: string]: ProjectCreateParams.Content | ProjectCreateParams.URL };
191191

192192
/**
193193
* Project name/slug

0 commit comments

Comments
 (0)