@enact/webos
Version:
webOS support library
39 lines (34 loc) • 1.1 kB
TypeScript
// Type definitions for webos/signLang
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;
export interface SignLangDecoratorConfig extends Object {
/**
* Time to wait (in milliseconds) before calling Sign Language API.
*/
signLangDelay?: number;
}
export interface SignLangDecoratorProps {
/**
* Unique ID for sign language.
*/
signLangId?: string;
/**
* Additional option for sign language.
*/
signLangOption?: object;
}
export function SignLangDecorator<P>(
config: SignLangDecoratorConfig,
Component: React.ComponentType<P> | string,
): React.ComponentType<P & SignLangDecoratorProps>;
export function SignLangDecorator<P>(
Component: React.ComponentType<P> | string,
): React.ComponentType<P & SignLangDecoratorProps>;
/**
* Activates sign language based on the singLangID.
*/
export function startSignLang(signLangId: string, option: object): void;
/**
* Deactivates sign language based on the signLangID.
*/
export function stopSignLang(signLangId: string, option: object): void;