tinybench - v5.1.0
    Preparing search index...

    Interface FnOptions

    The task function options

    interface FnOptions {
        afterAll?: FnHook;
        afterEach?: FnHook;
        beforeAll?: FnHook;
        beforeEach?: FnHook;
        signal?: AbortSignal;
    }
    Index

    Properties

    afterAll?: FnHook

    An optional function that is run after all iterations of this task end

    afterEach?: FnHook

    An optional function that is run after each iteration of this task

    beforeAll?: FnHook

    An optional function that is run before iterations of this task begin

    beforeEach?: FnHook

    An optional function that is run before each iteration of this task

    signal?: AbortSignal

    An AbortSignal for aborting this specific task

    If not provided, falls back to BenchOptions.signal