UNPKG

react-financial-charts

Version:
63 lines (62 loc) 4.51 kB
import * as React from "react"; export interface WithRatioProps { readonly ratio: number; } export interface WithRatioState { ratio: number; } export declare function withDeviceRatio(): <TProps extends WithRatioProps>(OriginalComponent: React.ComponentClass<TProps, any>) => { new (props: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>): { canvasRef: React.RefObject<HTMLCanvasElement>; componentDidMount(): void; render(): JSX.Element; context: any; setState<K extends "ratio">(state: WithRatioState | ((prevState: Readonly<WithRatioState>, props: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>) => WithRatioState | Pick<WithRatioState, K> | null) | Pick<WithRatioState, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<WithRatioState>; refs: { [key: string]: React.ReactInstance; }; shouldComponentUpdate?(nextProps: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>, nextState: Readonly<WithRatioState>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>, prevState: Readonly<WithRatioState>): any; componentDidUpdate?(prevProps: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>, prevState: Readonly<WithRatioState>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>, nextState: Readonly<WithRatioState>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>, nextState: Readonly<WithRatioState>, nextContext: any): void; }; new (props: Pick<TProps, Exclude<keyof TProps, "ratio">>, context?: any): { canvasRef: React.RefObject<HTMLCanvasElement>; componentDidMount(): void; render(): JSX.Element; context: any; setState<K extends "ratio">(state: WithRatioState | ((prevState: Readonly<WithRatioState>, props: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>) => WithRatioState | Pick<WithRatioState, K> | null) | Pick<WithRatioState, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<WithRatioState>; refs: { [key: string]: React.ReactInstance; }; shouldComponentUpdate?(nextProps: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>, nextState: Readonly<WithRatioState>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>, prevState: Readonly<WithRatioState>): any; componentDidUpdate?(prevProps: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>, prevState: Readonly<WithRatioState>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>, nextState: Readonly<WithRatioState>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<TProps, Exclude<keyof TProps, "ratio">>>, nextState: Readonly<WithRatioState>, nextContext: any): void; }; contextType?: React.Context<any> | undefined; };