diff --git a/package/example/src/frame-processors/ExamplePlugin.ts b/package/example/src/frame-processors/ExamplePlugin.ts index a9c5dfe..5fc1b3f 100644 --- a/package/example/src/frame-processors/ExamplePlugin.ts +++ b/package/example/src/frame-processors/ExamplePlugin.ts @@ -2,7 +2,14 @@ import { VisionCameraProxy, Frame } from 'react-native-vision-camera' const plugin = VisionCameraProxy.getFrameProcessorPlugin('example_plugin') -export function examplePlugin(frame: Frame): string[] { +interface Result { + example_array: (string | number | boolean)[] + example_str: string + example_bool: boolean + example_double: number +} + +export function examplePlugin(frame: Frame): Result { 'worklet' if (plugin == null) throw new Error('Failed to load Frame Processor Plugin "example_plugin"!') @@ -13,5 +20,5 @@ export function examplePlugin(frame: Frame): string[] { someNumber: 42, someObject: { test: 0, second: 'test' }, someArray: ['another test', 5], - }) as string[] + }) as unknown as Result }