@mega-yfue/eufy-sdk / ReadValue
Type Alias: ReadValue<T>
ts
type ReadValue<T> = T extends object ? Exclude<R, undefined> : T extends object ? ValueOf<P> : never;What a getter answers: a decode's own return type when there is one, otherwise the narrowing of the stored type. A decode IS the value a caller receives, so its type has to win — that is exactly the case (snoozeTime, a duration lifted out of a config blob) where the stored type is not the answer.
Type Parameters
T
T