Skip to content

Commit

Permalink
refactor(events): remove initializations from constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmath committed Mar 21, 2017
1 parent fe61948 commit d2d373f
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions src/testing/Events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,35 @@ export enum EventType {


export class EventNext<T> implements IObservableEvent {
type: EventType
type = EventType.next

constructor (public time: number, public value: T) {
this.type = EventType.next
}
constructor (public time: number, public value: T) {}
}

export class EventError implements IObservableEvent {
type: EventType
type = EventType.error

constructor (public time: number, public value: Error) {
this.type = EventType.error
}
constructor (public time: number, public value: Error) {}
}

export class EventComplete implements IObservableEvent {
type: EventType
type = EventType.complete

constructor (public time: number) {
this.type = EventType.complete
}
constructor (public time: number) {}
}


export class EventEnd implements IObservableEvent {
type: EventType
type = EventType.end

constructor (public time: number, public subscription: ISubscription) {
this.type = EventType.end
}
constructor (public time: number, public subscription: ISubscription) {}
}


export class EventStart implements IObservableEvent {
type: EventType
type = EventType.start

constructor (public time: number, public subscription: ISubscription) {
this.type = EventType.start
}
constructor (public time: number, public subscription: ISubscription) {}
}

export const EVENT = {
Expand Down

0 comments on commit d2d373f

Please sign in to comment.