Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
fix(js-sdk): infer keyword collision
Gergő Móriczd30356a22c55
diff --git a/apps/js-sdk/firecrawl/src/index.ts b/apps/js-sdk/firecrawl/src/index.tsindex 124a84e83..949cfe98a 100644--- a/apps/js-sdk/firecrawl/src/index.ts+++ b/apps/js-sdk/firecrawl/src/index.ts@@ -1,5 +1,5 @@import axios, { type AxiosResponse, type AxiosRequestHeaders } from "axios";-import type { infer as ZodInfer, ZodSchema } from "zod";+import type * as zt from "zod";import { zodToJsonSchema } from "zod-to-json-schema";import { WebSocket } from "isows";import { TypedEventTarget } from "typescript-event-target";@@ -83,7 +83,7 @@ export interface CrawlScrapeOptions {timeout?: number;}-export interface ScrapeParams<LLMSchema extends ZodSchema> extends CrawlScrapeOptions {+export interface ScrapeParams<LLMSchema extends zt.ZodSchema> extends CrawlScrapeOptions {extract?: {prompt?: string;schema?: LLMSchema;@@ -200,10 +200,10 @@ export default class FirecrawlApp {* @param params - Additional parameters for the scrape request.* @returns The response from the scrape operation.*/- async scrapeUrl<T extends ZodSchema>(+ async scrapeUrl<T extends zt.ZodSchema>(url: string,params?: ScrapeParams<T>- ): Promise<ScrapeResponse<ZodInfer<T>> | ErrorResponse> {+ ): Promise<ScrapeResponse<zt.infer<T>> | ErrorResponse> {const headers: AxiosRequestHeaders = {"Content-Type": "application/json",Authorization: `Bearer ${this.apiKey}`,