[feat] Add customMatcher option #93
Annotations
3 errors
Unhandled error:
src/options.test.ts#L36
TypeCheckError: Argument of type '{ unifyProcess boolean; target HTMLAnchorElement; detector (element Element | null) => { isDetected true; result Element | null; }; observeConfigs { ...; }; signal AbortSignal; }' is not assignable to parameter of type '(Omit<Partial<Options<Element | null, Element | null>>, keyof Options<Result, QuerySelectorResult>> & Omit<...> & { ...; }) | (Omit<...> & ... 1 more ... & { ...; })'.
Type '{ unifyProcess boolean; target HTMLAnchorElement; detector (element Element | null) => { isDetected true; result Element | null; }; observeConfigs { ...; }; signal AbortSignal; }' is not assignable to type 'Omit<Partial<Options<Element | null, Element | null>>, "target" | "unifyProcess" | "observeConfigs" | "detector" | "signal" | "customMatcher"> & Omit<...> & { ...; }'.
Property 'customMatcher' is missing in type '{ unifyProcess boolean; target HTMLAnchorElement; detector (element Element | null) => { isDetected true; result Element | null; }; observeConfigs { ...; }; signal AbortSignal; }' but required in type '{ target NodeLike; unifyProcess boolean; observeConfigs MutationObserverInit; detector Detector<Element, Element | null> | Detector<...>; signal AbortSignal | nullish; customMatcher nullish | ((selector string) => Element | null); }'.
❯ src/options.test.ts:36:28
|
Unhandled error:
src/options.test.ts#L56
TypeCheckError: Argument of type 'DefaultOptions<Element | null>' is not assignable to parameter of type '(Omit<Partial<Options<Element, Element | null>>, keyof Options<Result, QuerySelectorResult>> & Omit<...> & { ...; }) | (Omit<...> & ... 1 more ... & { ...; })'.
Type 'Options<Element, Element | null>' is not assignable to type 'Omit<Partial<Options<Element, Element | null>>, "target" | "unifyProcess" | "observeConfigs" | "detector" | "signal" | "customMatcher"> & Omit<...> & { ...; }'.
Type 'Options<Element, Element | null>' is not assignable to type '{ target NodeLike; unifyProcess boolean; observeConfigs MutationObserverInit; detector Detector<Element, Element | null>; signal AbortSignal | nullish; customMatcher nullish | ((selector string) => Element | null); }'.
Property 'customMatcher' is optional in type 'Options<Element, Element | null>' but required in type '{ target NodeLike; unifyProcess boolean; observeConfigs MutationObserverInit; detector Detector<Element, Element | null>; signal AbortSignal | nullish; customMatcher nullish | ((selector string) => Element | null); }'.
❯ src/options.test.ts:56:28
|
test
Process completed with exit code 1.
|