Skip to content

hap-fluent / ServicesObject

Type Alias: ServicesObject<T>

ts
type ServicesObject<T> = AccessoryInformation extends TupleToUnion<T> ? SimplifyDeep<InternalServicesObject<T>> : SimplifyDeep<InternalServicesObject<[...T, AccessoryInformation]>>;

Defined in: packages/hap-fluent/src/AccessoryHandler.ts:94

A record mapping camelCase service names to their corresponding FluentService instances.

Type Parameters

Type ParameterDescription
T extends readonly unknown[]Tuple of HAP interface types (e.g., [LightbulbInterface, SwitchInterface]).

Remarks

AccessoryInformation is always present in the resulting type even when not listed in T, because the HAP specification mandates it on every accessory. The type resolves service names using the generated ServiceMap and InterfaceMap from hap-codegen.

Released under the Apache-2.0 License.