Skip to content

Instantly share code, notes, and snippets.

@maxmumford
Last active February 23, 2018 17:34
Show Gist options
  • Save maxmumford/1050465a03c7111b1c28b365570d6311 to your computer and use it in GitHub Desktop.
Save maxmumford/1050465a03c7111b1c28b365570d6311 to your computer and use it in GitHub Desktop.
Basic TypeScript module definition for webcamjs
declare module 'webcamjs' {
export function attach(selector: string): any;
export function snap(callback: (dataUri: string) => void): void;
export function reset(): void;
export function on(event: 'live', callback: () => void): void
export function on(event: 'error', callback: (error: Error) => void): void
export function off(event: string, callback?: () => void): void;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment