For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /api/react.dataprocessors.md.
This is the dev preview website. Check out the document at lynxjs.org

Home > @lynx-js/react > DataProcessors

DataProcessors interface

The data processors that registered with Lynx.registerDataProcessors.

Signature:

export interface DataProcessors 

Example

Extending dataProcessors interface

import type { DataProcessors as WellKnownDataProcessors } from '@lynx-js/react';

declare module '@lynx-js/react' {
  interface DataProcessors extends WellKnownDataProcessors {
    foo(bar: string): number;
  }
}

Then you can use lynx.registerDataProcessors with types.

lynx.registerDataProcessors({
  dataProcessors: {
    foo(bar) {
      return 1;
    }
  }
})

Methods

Method

Description

getScreenMetricsOverride(metrics)?

(Optional) Optional processor to override screen metrics used by the app