Dummy tag that makes sure TypeScript doesn't consider all object types as conforming to this type. Not actually present on the object.
Returns a facet reader for this facet, which can be used to read it but not to define values for it.
Create an extension that computes a value for the facet from a state. You must take care to declare the parts of the state that this value depends on, since your function is only called again for a new state when one of those parts changed.
In cases where your value depends only on a single field, you'll
want to use the from method instead.
Create an extension that computes zero or more values for this facet from a state.
Shorthand method for registering a facet source with a state field as input. If the field's type corresponds to this facet's input type, the getter function can be omitted. If given, it will be used to retrieve the input from the field value.
Shorthand method for registering a facet source with a state field as input. If the field's type corresponds to this facet's input type, the getter function can be omitted. If given, it will be used to retrieve the input from the field value.
Staticdefine
A facet is a labeled value that is associated with an editor state. It takes inputs from any number of extensions, and combines those into a single output value.
Examples of uses of facets are the tab size, editor attributes, and update listeners.
Note that
Facetinstances can be used anywhere whereFacetReaderis expected.