Skip to content

Commit aa74622

Browse files
committed
Lint
1 parent 142554b commit aa74622

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

website/src/openApi/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import tokenApi from './tokenApi.json'
66

77
export const API_IDS = ['tokenApi'] as const
88

9-
export const APIS = {
9+
export const APIS: Record<ApiId, ApiConfig> = {
1010
tokenApi: {
1111
name: 'Token API',
1212
// url: 'https://token-api.thegraph.com/openapi', // production
@@ -39,7 +39,7 @@ export const APIS = {
3939
},
4040
},
4141
},
42-
} satisfies Record<ApiId, ApiConfig>
42+
}
4343

4444
export type ApiId = (typeof API_IDS)[number]
4545

@@ -142,9 +142,7 @@ export function getApi(apiId: ApiId, passedDocument?: OpenAPIV3_1.Document): Api
142142
if (typeof documentOperation !== 'object' || !('tags' in documentOperation) || !documentOperation.tags) continue
143143

144144
// Get the section name and path from the tags
145-
const sectionName = documentOperation.tags.find((tag) => tag in config.sections) as
146-
| keyof typeof config.sections
147-
| undefined
145+
const sectionName = documentOperation.tags.find((tag) => tag in config.sections)
148146
const section = sectionName ? config.sections[sectionName] : undefined
149147
if (!sectionName || !section || !('operationId' in documentOperation) || !documentOperation.operationId) {
150148
continue

0 commit comments

Comments
 (0)