Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@types/react-onclickoutside
Advanced tools
TypeScript definitions for react-onclickoutside
npm install --save @types/react-onclickoutside
This package contains type definitions for react-onclickoutside (https://github.com/Pomax/react-onclickoutside).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-onclickoutside.
import * as React from "react";
export {};
export interface HandleClickOutside<T> {
handleClickOutside: React.MouseEventHandler<T>;
}
export interface ConfigObject {
handleClickOutside?: HandleClickOutside<any>["handleClickOutside"] | undefined;
excludeScrollbar?: boolean | undefined;
}
export interface InjectedOnClickOutProps {
disableOnClickOutside(): void;
enableOnClickOutside(): void;
}
export type WithoutInjectedClickOutProps<P> = Pick<P, Exclude<keyof P, keyof InjectedOnClickOutProps>>;
export interface AdditionalProps extends ConfigObject {
disableOnClickOutside?: boolean | undefined;
eventTypes?: string | string[] | undefined;
outsideClickIgnoreClass?: string | undefined;
preventDefault?: boolean | undefined;
stopPropagation?: boolean | undefined;
}
export type ComponentConstructor<P> = React.ComponentType<P>;
export interface ClickOutComponentClass<P> extends React.ComponentClass<P> {
new(props: P, context?: any): React.Component<P, React.ComponentState> & HandleClickOutside<any>;
}
export type OnClickOutProps<P> = WithoutInjectedClickOutProps<P> & AdditionalProps;
export interface WrapperClass<P, C> {
new(): WrapperInstance<P, C>;
}
export interface WrapperInstance<P, C>
extends React.Component<OnClickOutProps<React.JSX.LibraryManagedAttributes<C, P>>>
{
getInstance(): C extends React.ComponentClass<any> ? InstanceType<C> : never;
}
type PropsOf<T> = T extends (
props: infer P,
context?: any,
) => React.ReactElement | null // Try to infer for SFCs
? P
: T extends new(props: infer P, context?: any) => React.Component // Otherwise try to infer for classes
? P
: never;
export default function OnClickOut<
C extends ComponentConstructor<P> | ClickOutComponentClass<P>,
P = PropsOf<C>,
>(component: C, config?: ConfigObject): WrapperClass<P, C>;
These definitions were written by Karol Janyst, Boris Sergeyev, and Thomas Levy.
FAQs
TypeScript definitions for react-onclickoutside
The npm package @types/react-onclickoutside receives a total of 44,501 weekly downloads. As such, @types/react-onclickoutside popularity was classified as popular.
We found that @types/react-onclickoutside demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.