Docs (4.0.0)
class View type

type ViewPreset

Type definition for the object that can be used to initialize a preset view.

static

type ViewPreset<TBase extends View, TView = any, K extends keyof TView = never> = TBase extends {
    applyViewPreset(preset: infer P): void;
} ? P & {
    [P in K]?: BindingOrValue<TView[P]>;
} : never

Summary

This type is used to put together the object type for e.g. ui.cell(...), based on the provided type parameters.

  • TBase is used to infer the type of the parameter accepted by View.applyViewPreset() on a subclass.
  • TView is used to infer the type of a property.
  • K is a string type containing all properties to take from TView.

Related

  • class View abstractAn abstract class that represents a view.