chore: deprecate useController (#1850)

This commit is contained in:
Alexey
2023-07-26 18:48:03 +03:00
committed by GitHub
parent 9b34a496dc
commit f41effd655
@@ -10,6 +10,9 @@ import { useContext, useEffect, useMemo, useRef } from 'react';
import { appContext } from './AppContext';
import type { ExtractInitArgs, IDestructibleController, IInitializableController, IServiceConstructor } from './IApp';
/**
* @deprecated use hooks instead
*/
export function useController<T extends IInitializableController>(ctor: IServiceConstructor<T>, ...args: ExtractInitArgs<T>): T;
export function useController<T>(ctor: IServiceConstructor<T>): T;
export function useController<T>(ctor: IServiceConstructor<T>, ...args: any[]): T {