@enact/webos
Version:
webOS support library
20 lines (16 loc) • 622 B
TypeScript
// Type definitions for webos/speech
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 VoiceControlDecoratorProps {
/**
* Callback to be executed when a wrapped element's `data-webos-voice-intent` is activated.
*/
onVoice: Function;
}
export function VoiceControlDecorator<P>(
Component: React.ComponentType<P> | string,
): React.ComponentType<P & VoiceControlDecoratorProps>;
/**
* Read alert text when accessibility audio guidance is enabled.
*/
export function readAlert(string: string, clear: boolean): void;