API Reference / @gtkx/runtime / getProperty
Function: getProperty()
Call Signature
getProperty<
TObject,TPropertyMap,TName>(obj,propertyName):NoInfer<TPropertyMap>[TName]
Defined in: packages/runtime/src/object.ts:188
Reads a GObject property using the object's generated property types.
Type Parameters
TObject
TObject extends object
TPropertyMap
TPropertyMap extends object = Extract<ReadableProperties<TObject>, object>
TName
TName extends string = Extract<NoInfer<keyof TPropertyMap>, string>
Parameters
obj
TObject
The object to read from.
propertyName
TName
The property name.
Returns
NoInfer<TPropertyMap>[TName]
Call Signature
getProperty(
obj,propertyName,descriptor):unknown
Defined in: packages/runtime/src/object.ts:201
Reads a GObject property and converts it to its JavaScript value using the descriptor.
Parameters
obj
object
The object to read from.
propertyName
string
The property name.
descriptor
Describes the property's type.
Returns
unknown