
Security News
Official Go SDK for MCP in Development, Stable Release Expected in August
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
@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
We found that @types/react-onclickoutside demonstrated a not healthy version release cadence and project activity because the last version was released 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
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.