@stoplight/lifecycle
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -1,6 +0,8 @@ | ||
export interface IActivatable { | ||
readonly state: 'deactivated' | 'isActivating' | 'activated' | 'isDeactivating'; | ||
export interface IMinimalActivatable { | ||
activate: () => Promise<void>; | ||
deactivate: () => Promise<void>; | ||
} | ||
export interface IActivatable extends IMinimalActivatable { | ||
readonly state: 'deactivated' | 'isActivating' | 'activated' | 'isDeactivating'; | ||
} | ||
export declare abstract class Activatable implements IActivatable { | ||
@@ -16,7 +18,7 @@ private _state; | ||
} | ||
export declare class ActivatableCollection extends Activatable implements IActivatableCollection { | ||
readonly activatables: IActivatable[]; | ||
export declare class ActivatableCollection<T extends IMinimalActivatable> extends Activatable implements IActivatableCollection { | ||
readonly activatables: T[]; | ||
protected doActivate(): Promise<void>; | ||
protected doDeactivate(): Promise<void>; | ||
push(activatables: IActivatable): void; | ||
push(activatables: T): void; | ||
} |
{ | ||
"name": "@stoplight/lifecycle", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Event and disposable helpers.", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
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
27855
244