symref
Version:
Static code checker for AI code agents (Windsurf, Cline, etc.)
57 lines • 2.62 kB
TypeScript
import React, { Component } from 'react';
declare class RefClassComponent extends Component {
private myRef;
componentDidMount(): void;
render(): import("react/jsx-runtime").JSX.Element;
}
interface LifecycleProps {
initialCount: number;
}
interface LifecycleState {
count: number;
lastUpdate: Date;
}
declare class LifecycleComponent extends Component<LifecycleProps, LifecycleState> {
constructor(props: LifecycleProps);
static getDerivedStateFromProps(props: LifecycleProps, state: LifecycleState): {
count: number;
lastUpdate: Date;
} | null;
shouldComponentUpdate(nextProps: LifecycleProps, nextState: LifecycleState): boolean;
componentDidUpdate(): void;
componentWillUnmount(): void;
render(): import("react/jsx-runtime").JSX.Element;
}
declare const EnhancedComponent: {
new (props: object): {
render(): import("react/jsx-runtime").JSX.Element;
context: unknown;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: object) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
forceUpdate(callback?: (() => void) | undefined): void;
readonly props: object;
state: Readonly<{}>;
componentDidMount?(): void;
shouldComponentUpdate?(nextProps: object, nextState: Readonly<{}>, nextContext: any): boolean;
componentWillUnmount?(): void;
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: object, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: object, prevState: Readonly<{}>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: object, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: object, nextContext: any): void;
componentWillUpdate?(nextProps: object, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: object, nextState: Readonly<{}>, nextContext: any): void;
};
contextType?: React.Context<any> | undefined;
propTypes?: any;
};
declare class BaseComponent extends Component {
baseMethod(): string;
render(): import("react/jsx-runtime").JSX.Element;
}
declare class ExtendedComponent extends BaseComponent {
render(): import("react/jsx-runtime").JSX.Element;
}
export { RefClassComponent, LifecycleComponent, EnhancedComponent, ExtendedComponent };
//# sourceMappingURL=AdvancedClassComponents.test.d.ts.map