mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-16 13:20:56 +00: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.
|
||||
export class Provider {
|
||||
|
||||
constructor(name) {
|
||||
constructor(name:string) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@@ -59,9 +59,9 @@ export class Provider {
|
||||
static installed():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
|
||||
let fullPath:string = path.join(Provider.installedProvidersDir, name);
|
||||
|
||||
Reference in New Issue
Block a user