Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tkurki committed Dec 4, 2023
1 parent 07b36e9 commit 6d9905d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import { Brand } from '@signalk/server-api'

export function startEvents(
app: any,

spark: any,

onEvent: (data: any) => void,
eventsFromQuery = ''
) {
Expand Down Expand Up @@ -57,8 +55,8 @@ export function startServerEvents(app: any, spark: any, onServerEvent: any) {
})
}

export type Handler = (...args: any[]) => void
export interface EventMap {
type Handler = (...args: any[]) => void
interface EventMap {
[k: string]: Handler | Handler[] | undefined
}

Expand All @@ -77,7 +75,7 @@ export function safeApply<T, A extends any[]>(
}
}

export function arrayClone<T>(arr: T[]): T[] {
function arrayClone<T>(arr: T[]): T[] {
const n = arr.length
const copy = new Array(n)
for (let i = 0; i < n; i += 1) {
Expand Down Expand Up @@ -199,7 +197,6 @@ export function wrappedEmitter(targetEmitter: EventEmitter): WrappedEmitter {
function emitWithEmitterId(
emitterId: EmitterId,
eventName: EventName,

...args: any[]
) {
const emittersForEvent =
Expand All @@ -214,7 +211,6 @@ export function wrappedEmitter(targetEmitter: EventEmitter): WrappedEmitter {
const addListenerWithId = function (
listenerId: ListenerId,
eventName: EventName,

listener: (...args: any[]) => void
) {
const listenersForEvent =
Expand Down

0 comments on commit 6d9905d

Please sign in to comment.