Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request - Implement type-safe of 'OnDestroy' #25

Closed
tumit opened this issue Nov 30, 2018 · 1 comment
Closed

Feature Request - Implement type-safe of 'OnDestroy' #25

tumit opened this issue Nov 30, 2018 · 1 comment

Comments

@tumit
Copy link

tumit commented Nov 30, 2018

Please add type-safe of untilDestroyed or create new function something like 'untilComponentDestroyed'

export const untilComponentDestroyed = (componentInstance: OnDestroy) => untilDestroyed(componentInstance);

it's nice to use type checking right ?

@j2L4e
Copy link

j2L4e commented Mar 22, 2019

It's easily wrapped anyway:

import { OnDestroy } from '@angular/core';
import { untilDestroyed } from 'ngx-take-until-destroy';

export function takeUntilDestroy (component: OnDestroy) {
  return untilDestroyed(component);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants