@etsoo/react
Version:
TypeScript ReactJs UI Independent Framework
42 lines (41 loc) • 1.15 kB
TypeScript
import { IAction, ICulture } from "@etsoo/appscript";
import { DataTypes } from "@etsoo/shared";
import { IProviderProps, IUpdate } from "./IState";
/**
* Culture action to manage resources
*/
export interface CultureAction extends ICulture, IAction {
}
/**
* Culture calls with the state
*/
export interface CultureCalls extends IUpdate<ICulture, CultureAction> {
/**
* Key value
* @param key Item key
*/
get<T = string>(key: string): T | undefined;
}
/**
* Culture provider props
*/
export type CultureProviderProps = IProviderProps<CultureAction>;
/**
* Culture state
* Creator for culture context and provider globally, not inside a component to avoid problem:
* Cannot update a component (`provider`) while rendering a different component
*/
export declare class CultureState {
/**
* Context
*/
readonly context: import("react").Context<CultureCalls>;
/**
* Provider
*/
readonly provider: import("react").FunctionComponent<import("react").PropsWithChildren<IProviderProps<CultureAction>>>;
/**
* Constructor
*/
constructor(item?: DataTypes.CultureDefinition);
}