forked from mystiq/hydrogen-web
Add return types
This commit is contained in:
parent
7270918b65
commit
7d12c2ba54
1 changed files with 2 additions and 3 deletions
|
@ -26,7 +26,6 @@ function disposeValue(value: Disposable): void {
|
|||
}
|
||||
|
||||
function isDisposable(value: Disposable): boolean {
|
||||
// todo: value can be undefined I think?
|
||||
return value && (typeof value === "function" || typeof value.dispose === "function");
|
||||
}
|
||||
|
||||
|
@ -46,10 +45,10 @@ export class Disposables {
|
|||
return disposable;
|
||||
}
|
||||
|
||||
untrack(disposable: Disposable) {
|
||||
untrack(disposable: Disposable): null {
|
||||
if (this.isDisposed) {
|
||||
console.warn("Disposables already disposed, cannot untrack");
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
const idx = this._disposables!.indexOf(disposable);
|
||||
if (idx >= 0) {
|
||||
|
|
Loading…
Reference in a new issue