UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

6 lines (5 loc) • 281 B
export function assertActionHandler(identifier: string, handler: unknown): void { if (typeof identifier !== 'string' || !identifier.trim() || typeof handler !== 'function') { throw new TypeError('AppIntents.defineAction requires a non-empty identifier and a function') } }