Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

frameworks.md

27 lines629 Bytes

FrameworkGenerics

The FrameworksGenerics interface is available for framework adapters to extend the internal types used by the core router instance.

Primarily these include:

  • Component

Internally, the GetFrameworkGeneric function is used to retrieve these generics.

export interface FrameworkGenerics {
  // The following properties are used internally
  // and are extended by framework adapters, but cannot be
  // pre-defined as constraints:
  //
  // Component: any
}

export type GetFrameworkGeneric<U> = U extends keyof FrameworkGenerics
  ? FrameworkGenerics[U]
  : any