Sha256: 7b12bef948dbb393f8b9592952f8b9394da6c5c39eed8c78f9528b2e5a5c630a

Contents?: true

Size: 1.18 KB

Versions: 26

Compression:

Stored size: 1.18 KB

Contents

type anyFunc = (...a: any[]) => any;
type Params<Prop> = Prop extends anyFunc ? Parameters<Prop> : [Prop];
type ImplReturn<Prop> = Prop extends anyFunc ? Parameters<Prop> : Prop;
export declare function prepareInterceptor<ElementType extends Element, PropName extends keyof ElementType>(element: ElementType, propName: PropName, interceptorImpl: (this: ElementType, ...args: Params<ElementType[PropName]>) => {
    /**
     * React tracks the changes on element properties.
     * This workaround tries to alter the DOM element without React noticing,
     * so that it later picks up the change.
     *
     * @see https://github.com/facebook/react/blob/148f8e497c7d37a3c7ab99f01dec2692427272b1/packages/react-dom/src/client/inputValueTracking.js#L51-L104
     */
    applyNative?: boolean;
    realArgs?: ImplReturn<ElementType[PropName]>;
    then?: () => void;
}): void;
export declare function prepareValueInterceptor(element: HTMLInputElement | HTMLTextAreaElement): void;
export declare function prepareSelectionInterceptor(element: HTMLInputElement | HTMLTextAreaElement): void;
export declare function prepareRangeTextInterceptor(element: HTMLInputElement | HTMLTextAreaElement): void;
export {};

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
clapton-0.0.26 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.25 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.24 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.23 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.22 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.21 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.20 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.19 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.18 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.17 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.16 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.15 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.14 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.13 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.12 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.11 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.10 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.9 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.8 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts
clapton-0.0.7 lib/clapton/javascripts/node_modules/@testing-library/user-event/dist/types/document/interceptor.d.ts