-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhomey-override.d.ts
More file actions
27 lines (23 loc) · 906 Bytes
/
Copy pathhomey-override.d.ts
File metadata and controls
27 lines (23 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import type { TypedManagerSettings } from '@olivierzal/homey-kit/types'
import type HomeyLib from 'homey/lib/Homey.js'
import type MELCloudExtensionApp from './app.mts'
import type { HomeySettings } from './types.mts'
declare module 'homey' {
interface Homey extends HomeyLib {
manifest: { version: string }
settings: ManagerSettings
}
// The SDK interfaces are extended, not replaced: the kit generics
// supply the narrowed member SIGNATURES, the base supplies everything
// else. Extending both directly conflicts on the members they share.
interface ManagerSettings extends HomeyLib.ManagerSettings {
get: TypedManagerSettings<HomeySettings>['get']
set: TypedManagerSettings<HomeySettings>['set']
unset: TypedManagerSettings<HomeySettings>['unset']
}
}
declare module 'homey/lib/Homey.js' {
interface Homey extends HomeyLib {
app: MELCloudExtensionApp
}
}