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

ReactAppFieldApi.lib.ts

12 lines461 Bytes

1import { InternalFieldApi } from '@tanstack/form-core/internals'
2import type { ReactComponentTree } from './componentMap.public'
3​
4export function createInternalReactAppFieldApiClass(
5 fieldComponents: ReactComponentTree,
6): typeof InternalFieldApi {
7 class InternalReactAppFieldApi extends InternalFieldApi<any, any, any> {}
8​
9 Object.assign(InternalReactAppFieldApi.prototype, fieldComponents)
10​
11 return InternalReactAppFieldApi as typeof InternalFieldApi