@wixc3/patterns
Advanced tools
Comparing version 14.1.0 to 14.1.1
@@ -57,2 +57,3 @@ "use strict"; | ||
this.constrains = []; | ||
this.dispose = this.dispose.bind(this); | ||
this.groups.push(...initialGroups.map(createGroup)); | ||
@@ -59,0 +60,0 @@ } |
@@ -53,2 +53,3 @@ import { getGroupConstrainedIndex, normalizeConstraints } from './constraints'; | ||
this.constrains = []; | ||
this.dispose = this.dispose.bind(this); | ||
this.groups.push(...initialGroups.map(createGroup)); | ||
@@ -55,0 +56,0 @@ } |
{ | ||
"name": "@wixc3/patterns", | ||
"version": "14.1.0", | ||
"version": "14.1.1", | ||
"description": "A utility for saving objects to be disposed", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
@@ -79,2 +79,3 @@ import { DisposalGroup, getGroupConstrainedIndex, GroupConstraints, normalizeConstraints } from './constraints'; | ||
) { | ||
this.dispose = this.dispose.bind(this); | ||
this.groups.push(...initialGroups.map(createGroup)); | ||
@@ -113,3 +114,2 @@ } | ||
*/ | ||
add(...[nameOrOptions, disposable]: [id: string, disposable: DisposableItem] | [options: DisposableOptions]) { | ||
@@ -116,0 +116,0 @@ if (typeof nameOrOptions === 'string') { |
@@ -32,2 +32,8 @@ import { expect, use } from 'chai'; | ||
}); | ||
it('dispose() should be bound', async () => { | ||
// eslint-disable-next-line @typescript-eslint/unbound-method | ||
const { dispose } = createDisposables('test'); | ||
// will throw if unbound | ||
await dispose(); | ||
}); | ||
it('times out when the disposal takes too long', async () => { | ||
@@ -34,0 +40,0 @@ const disposables = createDisposables('test'); |
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
256014
4972