mirror of
https://github.com/mtan93/homebridge.git
synced 2026-05-09 22:06:55 +01:00
Add some type annotations
This commit is contained in:
@@ -6,7 +6,7 @@ import { HOMEBRIDGE_VERSION } from '../homebridge';
|
|||||||
// This class represents a HomeBridge Provider that may or may not be installed.
|
// This class represents a HomeBridge Provider that may or may not be installed.
|
||||||
export class Provider {
|
export class Provider {
|
||||||
|
|
||||||
constructor(name) {
|
constructor(name:string) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,9 +59,9 @@ export class Provider {
|
|||||||
static installed():Array<Provider> {
|
static installed():Array<Provider> {
|
||||||
|
|
||||||
let providers:Array<Provider> = [];
|
let providers:Array<Provider> = [];
|
||||||
let names = fs.readdirSync(Provider.installedProvidersDir);
|
let names:Array<string> = fs.readdirSync(Provider.installedProvidersDir);
|
||||||
|
|
||||||
for (let name of names) {
|
for (let name:string of names) {
|
||||||
|
|
||||||
// reconstruct full path
|
// reconstruct full path
|
||||||
let fullPath:string = path.join(Provider.installedProvidersDir, name);
|
let fullPath:string = path.join(Provider.installedProvidersDir, name);
|
||||||
|
|||||||
Reference in New Issue
Block a user