function / @typed/ui/Dom/Props

getProperty

Reads a property from an unknown generic value without throwing on nullish input.

Learn this UI primitive →

Package version
1.0.0-beta.7
Category
Property inspection
Since
1.0.0

Import

import { getProperty } from "@typed/ui/Dom/Props";

Signatures

export declare function getProperty<const Value, const Key extends PropertyKey>(value: Value, key: Key): Property<Value, Key>;

Why

Generic option construction needs runtime behavior matching the public Property type.

Ownership and lifetime

Pure read; no value is retained.

Source