Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
fix: Fix TypeScript type errors in lazy initialization
- Add `as unknown` in OpenAPI page type assertion - Use `any` type for lazy-initialized reference source Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
sohamganatra committed
Jan 28, 2026 at 00:00 UTC
13211b12b5385ca4cc7587eb6348aef3341710e8
2 files changed
+5
-3
docs/app/llms.mdx/[[...slug]]/route.ts
+1
-1
@@ -448,7 +448,7 @@ export async function GET(
448
if ('getAPIPageProps' in page.data) {
449
try {
450
const markdown = await openapiPageToMarkdown(
451
- page as { url: string; data: OpenAPIPageData }
451
+ page as unknown as { url: string; data: OpenAPIPageData }
452
);
453
return new Response(markdown, {
454
headers: {
docs/lib/source.ts
+4
-2
@@ -13,8 +13,10 @@ export const source = loader({
13
14
// Combined reference source with MDX pages and OpenAPI-generated pages
15
// Lazy initialization to avoid top-level await issues in serverless
16
-let _referenceSource: ReturnType<typeof loader> | null = null;
17
-let _openapiPagesPromise: Promise<Awaited<ReturnType<typeof openapiSource>>> | null = null;
16
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
17
+let _referenceSource: any = null;
18
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
19
+let _openapiPagesPromise: Promise<any> | null = null;
20
21
async function getOpenapiPages() {
22
if (!_openapiPagesPromise) {