@wixc3/patterns
Advanced tools
Comparing version 12.0.1 to 12.0.2
@@ -79,3 +79,3 @@ import { GroupConstraints } from './constraints'; | ||
*/ | ||
dispose(): Promise<void>; | ||
dispose: () => Promise<void>; | ||
/** | ||
@@ -82,0 +82,0 @@ * |
@@ -63,2 +63,11 @@ "use strict"; | ||
this.constrains = []; | ||
/** | ||
* Disposes all disposables in all groups one at the time, | ||
* order based on constraints | ||
*/ | ||
this.dispose = async () => { | ||
for (const { disposables } of this.groups) { | ||
await disposables.dispose(); | ||
} | ||
}; | ||
} | ||
@@ -113,11 +122,2 @@ /** | ||
/** | ||
* Disposes all disposables in all groups one at the time, | ||
* order based on constraints | ||
*/ | ||
async dispose() { | ||
for (const { disposables } of this.groups) { | ||
await disposables.dispose(); | ||
} | ||
} | ||
/** | ||
* | ||
@@ -124,0 +124,0 @@ * @returns a serialized list of groups and their disposables and constraints |
@@ -79,3 +79,3 @@ import { GroupConstraints } from './constraints'; | ||
*/ | ||
dispose(): Promise<void>; | ||
dispose: () => Promise<void>; | ||
/** | ||
@@ -82,0 +82,0 @@ * |
@@ -59,2 +59,11 @@ import { getGroupConstrainedIndex, normalizeConstraints } from './constraints'; | ||
this.constrains = []; | ||
/** | ||
* Disposes all disposables in all groups one at the time, | ||
* order based on constraints | ||
*/ | ||
this.dispose = async () => { | ||
for (const { disposables } of this.groups) { | ||
await disposables.dispose(); | ||
} | ||
}; | ||
} | ||
@@ -109,11 +118,2 @@ /** | ||
/** | ||
* Disposes all disposables in all groups one at the time, | ||
* order based on constraints | ||
*/ | ||
async dispose() { | ||
for (const { disposables } of this.groups) { | ||
await disposables.dispose(); | ||
} | ||
} | ||
/** | ||
* | ||
@@ -120,0 +120,0 @@ * @returns a serialized list of groups and their disposables and constraints |
{ | ||
"name": "@wixc3/patterns", | ||
"version": "12.0.1", | ||
"version": "12.0.2", | ||
"description": "A utility for saving objects to be disposed", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
@@ -134,7 +134,7 @@ import { DisposalGroup, getGroupConstrainedIndex, GroupConstraints, normalizeConstraints } from './constraints'; | ||
*/ | ||
async dispose() { | ||
dispose = async () => { | ||
for (const { disposables } of this.groups) { | ||
await disposables.dispose(); | ||
} | ||
} | ||
}; | ||
@@ -141,0 +141,0 @@ /** |
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
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
197650