Fix code-style
This commit is contained in:
@@ -12,7 +12,7 @@ export interface MqttOptions {
|
||||
tls: boolean
|
||||
certValidation: boolean
|
||||
clientId?: string
|
||||
subscriptions: string[]
|
||||
subscriptions: Array<string>
|
||||
certificateAuthority?: string
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { MqttMessage } from '../../../events'
|
||||
|
||||
export class ChangeBuffer {
|
||||
private buffer: MqttMessage[] = []
|
||||
private buffer: Array<MqttMessage> = []
|
||||
private size = 0
|
||||
private maxSize = 100_000_000 // ~100MB
|
||||
public length = 0
|
||||
@@ -27,7 +27,7 @@ export class ChangeBuffer {
|
||||
return this.size / this.maxSize
|
||||
}
|
||||
|
||||
public popAll(): MqttMessage[] {
|
||||
public popAll(): Array<MqttMessage> {
|
||||
const tmpBuffer = this.buffer
|
||||
this.buffer = []
|
||||
this.size = 0
|
||||
|
||||
@@ -6,7 +6,7 @@ export class RingBuffer<T extends Lengthwise> {
|
||||
private capacity: number
|
||||
private maxItems: number
|
||||
private usage: number = 0
|
||||
private items: T[] = []
|
||||
private items: Array<T> = []
|
||||
private start: number = 0
|
||||
private end: number = 0
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ export class TreeNode<ViewModel> {
|
||||
previous.removeEdge(this.sourceEdge)
|
||||
}
|
||||
|
||||
private findChild(edges: string[]): TreeNode<ViewModel> | undefined {
|
||||
private findChild(edges: Array<string>): TreeNode<ViewModel> | undefined {
|
||||
if (edges.length === 0) {
|
||||
return this
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ interface HasLength {
|
||||
}
|
||||
|
||||
export abstract class TreeNodeFactory {
|
||||
public static insertNodeAtPosition<ViewModel>(edgeNames: string[], node: TreeNode<ViewModel>) {
|
||||
public static insertNodeAtPosition<ViewModel>(edgeNames: Array<string>, node: TreeNode<ViewModel>) {
|
||||
let currentNode: TreeNode<ViewModel> = new Tree()
|
||||
let edge
|
||||
for (const edgeName of edgeNames) {
|
||||
@@ -19,7 +19,7 @@ export abstract class TreeNodeFactory {
|
||||
node.sourceEdge!.target = node
|
||||
}
|
||||
|
||||
public static fromEdgesAndValue<ViewModel>(edgeNames: string[], value?: Base64Message | null): TreeNode<ViewModel> {
|
||||
public static fromEdgesAndValue<ViewModel>(edgeNames: Array<string>, value?: Base64Message | null): TreeNode<ViewModel> {
|
||||
const node = new TreeNode<ViewModel>()
|
||||
node.setMessage({
|
||||
value: value || undefined,
|
||||
|
||||
Reference in New Issue
Block a user