destroyable
Advanced tools
Comparing version 0.7.0 to 0.8.0
@@ -1,2 +0,2 @@ | ||
import { IAwaitable } from './IAwaitable'; | ||
import { Promisable } from "type-fest"; | ||
/** | ||
@@ -15,3 +15,3 @@ * Interface, all destroyable objects implement | ||
*/ | ||
destroy(): IAwaitable<void>; | ||
destroy(): Promisable<void>; | ||
} |
@@ -6,3 +6,2 @@ import { AlreadyDestroyedError } from './AlreadyDestroyedError'; | ||
import { NotFoundError } from './errors/NotFoundError'; | ||
import { IAwaitable } from './IAwaitable'; | ||
import { IDestroyable } from './IDestroyable'; | ||
@@ -21,2 +20,2 @@ import { IRegisterItemsOptions } from './IRegisterItemsOptions'; | ||
import { teardown } from './TeardownLogic'; | ||
export { ITick, IWork, IWaiter, teardown, IAwaitable, softDestroy, Destroyable, Registration, IDestroyable, ISubscription, NotFoundError, ITeardownLogic, CollisionError, DestroyableLoop, registerItemsInArray, registerPairsInObject, IRegisterItemsOptions, AlreadyDestroyedError, registerItemsInSubjectOfArrays }; | ||
export { ITick, IWork, IWaiter, teardown, softDestroy, Destroyable, Registration, IDestroyable, ISubscription, NotFoundError, ITeardownLogic, CollisionError, DestroyableLoop, registerItemsInArray, registerPairsInObject, IRegisterItemsOptions, AlreadyDestroyedError, registerItemsInSubjectOfArrays }; |
@@ -1,4 +0,4 @@ | ||
import { IAwaitable } from '.'; | ||
export declare type IWork = () => IAwaitable<void>; | ||
import { Promisable } from "type-fest"; | ||
export declare type IWork = () => Promisable<void>; | ||
export declare type ITick = IWork; | ||
export declare type IWaiter = IWork; |
@@ -0,3 +1,3 @@ | ||
import { Promisable } from 'type-fest'; | ||
import { Destroyable } from './Destroyable'; | ||
import { IAwaitable } from './IAwaitable'; | ||
import { IDestroyable } from './IDestroyable'; | ||
@@ -22,3 +22,3 @@ import { ISubscription } from './ISubscription'; | ||
isDestroyed: () => boolean; | ||
}) => IAwaitable<ITeardownLogic | void>): Registration; | ||
}) => Promisable<ITeardownLogic | void>): Registration; | ||
/** | ||
@@ -30,3 +30,3 @@ * Join multiple registrations into one | ||
*/ | ||
static join(...registrations: Array<IAwaitable<IDestroyable>>): Registration; | ||
static join(...registrations: Array<Promisable<IDestroyable>>): Registration; | ||
static loop(optionsOrTick: ITick | { | ||
@@ -42,3 +42,3 @@ tick: ITick; | ||
*/ | ||
static fromSubscription(subscriptionFactory: (registerAdditionalSubscription: (additionalSubscription: IAwaitable<ISubscription>) => void) => IAwaitable<ISubscription>): Registration; | ||
static fromSubscription(subscriptionFactory: (registerAdditionalSubscription: (additionalSubscription: Promisable<ISubscription>) => void) => Promisable<ISubscription>): Registration; | ||
static void(): Registration; | ||
@@ -45,0 +45,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import { IAwaitable } from './IAwaitable'; | ||
import { Promisable } from 'type-fest'; | ||
import { IDestroyable } from './IDestroyable'; | ||
@@ -7,2 +7,2 @@ /** | ||
*/ | ||
export declare function softDestroy(destroyable: IAwaitable<IDestroyable>): Promise<void>; | ||
export declare function softDestroy(destroyable: Promisable<IDestroyable>): Promise<void>; |
@@ -61,4 +61,3 @@ "use strict"; | ||
exports.teardown = teardown; | ||
// TODO: Make compatible with IAwaitable<IDestroyable | undefined> | ||
// TODO: Use in Registration.join | ||
//# sourceMappingURL=TeardownLogic.js.map |
{ | ||
"name": "destroyable", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"description": "Multiple utilities that help to build destroyable objects in javascript", | ||
@@ -38,4 +38,5 @@ "author": "Pavol Hejný <pavol@collboard.com> (https://pavolhejny.com)", | ||
"dependencies": { | ||
"typescript": "^4.3.4", | ||
"rxjs": "^6.6.2" | ||
"rxjs": "^6.6.2", | ||
"type-fest": "^2.5.2", | ||
"typescript": "^4.3.4" | ||
}, | ||
@@ -42,0 +43,0 @@ "devDependencies": { |
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
Sorry, the diff of this file is not supported yet
62763
3
51
1066
+ Addedtype-fest@^2.5.2
+ Addedtype-fest@2.19.0(transitive)