Skip to content

Commit

Permalink
test ...
Browse files Browse the repository at this point in the history
  • Loading branch information
un33k committed Jan 27, 2019
1 parent d2d66ea commit 6fc8057
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pkgs/unsub/src/unsub.decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export function Unsubscribable(options = DefaultUnsubscribableOptions) {
options = { ...DefaultUnsubscribableOptions, ...options };
return <T extends { new (...args: any[]): any }>(target: T) => {
return class UnsubClass extends target implements OnDestroy {

/**
* Validate requirements
* @returns void
Expand All @@ -30,7 +29,7 @@ export function Unsubscribable(options = DefaultUnsubscribableOptions) {
throw Error(
`${
target.name
} "destroy$;" must be an instance of "Subject<boolean>" if class is decorated with @Unsubscribable`
} must have "destroy$ = new Subject<boolean>();" if decorated with @Unsubscribable`
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/unsub/tst/unsub.decorator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('@Unsubscribable', () => {
it('should complete destroy$ on ngOnDestroy', () => {
@Unsubscribable({})
class UnsubComponent {
destroy$: Subject<boolean> = new Subject<boolean>();
destroy$ = new Subject<boolean>();
}

const comp = new UnsubComponent();
Expand Down

0 comments on commit 6fc8057

Please sign in to comment.