@reactive-js/disposable
Advanced tools
Comparing version 0.0.32 to 0.0.33
@@ -21,5 +21,5 @@ export interface ErrorLike { | ||
export declare const createSerialDisposable: () => SerialDisposableLike; | ||
export interface DisposableWrapperLike<T> extends DisposableLike { | ||
export interface DisposableValueLike<T> extends DisposableLike { | ||
value: T; | ||
} | ||
export declare const createDisposableWrapper: <T>(value: T, cleanup: (v: T) => void) => DisposableWrapperLike<T>; | ||
export declare const createDisposableValue: <T>(value: T, cleanup: (v: T) => void) => DisposableValueLike<T>; |
@@ -83,5 +83,2 @@ "use strict"; | ||
} | ||
get isDisposed() { | ||
return this.disposable.isDisposed; | ||
} | ||
set inner(newInner) { | ||
@@ -100,5 +97,8 @@ if (this.isDisposed) { | ||
} | ||
get isDisposed() { | ||
return this.disposable.isDisposed; | ||
} | ||
} | ||
exports.createSerialDisposable = () => new SerialDisposableImpl(); | ||
class DisposableWrapperImpl { | ||
class DisposableValueImpl { | ||
constructor(value) { | ||
@@ -114,3 +114,3 @@ this.value = value; | ||
} | ||
exports.createDisposableWrapper = (value, cleanup) => new DisposableWrapperImpl(value).add(() => cleanup(value)); | ||
exports.createDisposableValue = (value, cleanup) => new DisposableValueImpl(value).add(() => cleanup(value)); | ||
//# sourceMappingURL=index.js.map |
@@ -21,5 +21,5 @@ export interface ErrorLike { | ||
export declare const createSerialDisposable: () => SerialDisposableLike; | ||
export interface DisposableWrapperLike<T> extends DisposableLike { | ||
export interface DisposableValueLike<T> extends DisposableLike { | ||
value: T; | ||
} | ||
export declare const createDisposableWrapper: <T>(value: T, cleanup: (v: T) => void) => DisposableWrapperLike<T>; | ||
export declare const createDisposableValue: <T>(value: T, cleanup: (v: T) => void) => DisposableValueLike<T>; |
@@ -79,5 +79,2 @@ const doDispose = (disposable, error) => { | ||
} | ||
get isDisposed() { | ||
return this.disposable.isDisposed; | ||
} | ||
set inner(newInner) { | ||
@@ -96,5 +93,8 @@ if (this.isDisposed) { | ||
} | ||
get isDisposed() { | ||
return this.disposable.isDisposed; | ||
} | ||
} | ||
export const createSerialDisposable = () => new SerialDisposableImpl(); | ||
class DisposableWrapperImpl { | ||
class DisposableValueImpl { | ||
constructor(value) { | ||
@@ -110,3 +110,3 @@ this.value = value; | ||
} | ||
export const createDisposableWrapper = (value, cleanup) => new DisposableWrapperImpl(value).add(() => cleanup(value)); | ||
export const createDisposableValue = (value, cleanup) => new DisposableValueImpl(value).add(() => cleanup(value)); | ||
//# sourceMappingURL=index.js.map |
@@ -21,6 +21,6 @@ export interface ErrorLike { | ||
export declare const createSerialDisposable: () => SerialDisposableLike; | ||
export interface DisposableWrapperLike<T> extends DisposableLike { | ||
export interface DisposableValueLike<T> extends DisposableLike { | ||
value: T; | ||
} | ||
export declare const createDisposableWrapper: <T>(value: T, cleanup: (v: T) => void) => DisposableWrapperLike<T>; | ||
export declare const createDisposableValue: <T>(value: T, cleanup: (v: T) => void) => DisposableValueLike<T>; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "@reactive-js/disposable", | ||
"version": "0.0.32", | ||
"version": "0.0.33", | ||
"main": "dist/cjs/index.js", | ||
@@ -65,3 +65,3 @@ "module": "dist/esm5/index.js", | ||
}, | ||
"gitHead": "352c7637c9ea06b52a8407b8d167e57fde1fa239" | ||
"gitHead": "1c5eece990f7e48fce3f8510f74a5204fc69c4b5" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18859