isDataListKVItemValueComponent
DataList
stable
Type guard that narrows an IDataListKVItem value to the dynamic-component descriptor shape (IDataListKVItemValueComponent). Enables the template to call <component :is> without optional chaining.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- vrequiredIDataListKVItem['value']
- The value field of a KV data list item. Can be a string, number, or an IDataListKVItemValueComponent descriptor object.
API
Return value
The value returned by this util.
- true when v is an object with a component property; false for primitive values.
Usage
Examples
Ready-to-paste usage snippets.
Narrow value to dynamic component in a template