Function: view()
view<
T>(): {<P,S>(select):ParameterizedView<T,P,MutableSelection<T,S>>; <S>(select):View<T,MutableSelection<T,S>>; }
Defined in: fate/lib/index.d.mts:90
Creates a reusable view for an object using the declared selection.
Type Parameters
T
T extends Entity
Returns
{<P, S>(select): ParameterizedView<T, P, MutableSelection<T, S>>; <S>(select): View<T, MutableSelection<T, S>>; }
Example
ts
const PostView = view<Post>()({
id: true,
title: true,
});