diff --git a/private/react-native-fantom/src/Benchmark.js b/private/react-native-fantom/src/Benchmark.js index ae7c5fb78e3..2e62afa1b41 100644 --- a/private/react-native-fantom/src/Benchmark.js +++ b/private/react-native-fantom/src/Benchmark.js @@ -18,7 +18,7 @@ import { type TaskResult, } from 'tinybench'; -type SuiteOptions = $ReadOnly<{ +export type SuiteOptions = $ReadOnly<{ minIterations?: number, minDuration?: number, warmup?: boolean, @@ -28,7 +28,9 @@ type SuiteOptions = $ReadOnly<{ testOnly?: boolean, }>; -type TestOptions = $ReadOnly<{ +export type TestOptions = FnOptions; + +type InternalTestOptions = $ReadOnly<{ ...FnOptions, only?: boolean, }>; @@ -71,7 +73,7 @@ interface SuiteAPI { interface TestTask { name: string; fn: () => void; - options: TestOptions | void; + options: InternalTestOptions | void; } export function suite( diff --git a/private/react-native-fantom/src/index.js b/private/react-native-fantom/src/index.js index 5fe2b88d1ca..1be3fd4af5b 100644 --- a/private/react-native-fantom/src/index.js +++ b/private/react-native-fantom/src/index.js @@ -567,6 +567,11 @@ export function enqueueModalSizeUpdate( export const unstable_benchmark = Benchmark; +export type { + SuiteOptions as BenchmarkSuiteOptions, + TestOptions as BenchmarkTestOptions, +} from './Benchmark'; + /** * Quick and dirty polyfills required by tinybench. */