Skip to main content

isSchemaField

function

Whether an accessor names a node field rather than a method. Generic in the field type so it narrows to the direction it was handed: given a SchemaGetterAccessor it yields a SchemaGetterField, whose `getterTable` is then the only table in scope.

function isSchemaField<T extends SchemaFieldBase>(accessor: string | T | null | undefined): accessor is T

Import

import { isSchemaField } from '@modular/sdk/editor';