json-crawl
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -23,3 +23,3 @@ export type JsonPath = (string | number)[]; | ||
node: any; | ||
} & (T extends object ? T : never); | ||
} & (T extends object ? T : {}); | ||
export type CloneHook<T = any, R = any> = CrawlHook<CloneState<T>, R>; | ||
@@ -33,2 +33,2 @@ export type CrawlHook<T = any, R = any> = (value: unknown, ctx: CrawlContext<T, R>) => Promise<CrawlHookResponse<T> | null> | CrawlHookResponse<T> | null; | ||
[key: CrawlRulesKey | '/*']: CrawlRules<R, T> | CrawlRulesFunc<R, T>; | ||
} & (R extends object ? R : never); | ||
} & (R | {}); |
@@ -23,3 +23,3 @@ export type JsonPath = (string | number)[]; | ||
node: any; | ||
} & (T extends object ? T : never); | ||
} & (T extends object ? T : {}); | ||
export type CloneHook<T = any, R = any> = CrawlHook<CloneState<T>, R>; | ||
@@ -33,2 +33,2 @@ export type CrawlHook<T = any, R = any> = (value: unknown, ctx: CrawlContext<T, R>) => Promise<CrawlHookResponse<T> | null> | CrawlHookResponse<T> | null; | ||
[key: CrawlRulesKey | '/*']: CrawlRules<R, T> | CrawlRulesFunc<R, T>; | ||
} & (R extends object ? R : never); | ||
} & (R | {}); |
@@ -23,3 +23,3 @@ export type JsonPath = (string | number)[]; | ||
node: any; | ||
} & (T extends object ? T : never); | ||
} & (T extends object ? T : {}); | ||
export type CloneHook<T = any, R = any> = CrawlHook<CloneState<T>, R>; | ||
@@ -33,2 +33,2 @@ export type CrawlHook<T = any, R = any> = (value: unknown, ctx: CrawlContext<T, R>) => Promise<CrawlHookResponse<T> | null> | CrawlHookResponse<T> | null; | ||
[key: CrawlRulesKey | '/*']: CrawlRules<R, T> | CrawlRulesFunc<R, T>; | ||
} & (R extends object ? R : never); | ||
} & (R | {}); |
{ | ||
"name": "json-crawl", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Async and sync crawler for json object", | ||
@@ -5,0 +5,0 @@ "module": "dist/esm/index.js", |
102749