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

WithoutVirtualProps.md

29 lines736 Bytes

type WithoutVirtualProps<T> = T extends unknown ? Omit<T, keyof VirtualRowProps> : never;

Defined in: packages/db/src/virtual-props.ts:159

Extracts the base type from a type that may have virtual properties. Useful when you need to work with the raw data without virtual properties.

Type Parameters

T

T

The type that may include virtual properties

Example

type UserWithVirtual = { id: string; name: string; $hasPendingWrites: boolean; $origin: 'local' | 'remote' }
type User = WithoutVirtualProps<UserWithVirtual>
// { id: string; name: string }