@pnp/core-commonjs
Advanced tools
Comparing version 3.0.0-v3nightly.20220025 to 3.0.0-v3nightly.20220026
@@ -127,5 +127,5 @@ "use strict"; | ||
} | ||
let result = undefined; | ||
for (let i = 0; i < extensions.length; i++) { | ||
const extension = extensions[i]; | ||
let result = undefined; | ||
if (util_js_1.isFunc(extension)) { | ||
@@ -136,3 +136,3 @@ // this extension is a function which we call | ||
else if (op === "get" && Reflect.has(extension, rest[0])) { | ||
// this extension is a named extension meaning we are overriding a specific method/property | ||
// this extension is a named extension meaning we are adding/overriding a specific method/property | ||
result = Reflect.get(extension, rest[0], target); | ||
@@ -139,0 +139,0 @@ } |
{ | ||
"name": "@pnp/core-commonjs", | ||
"version": "3.0.0-v3nightly.20220025", | ||
"version": "3.0.0-v3nightly.20220026", | ||
"description": "pnp - provides shared functionality across all pnp libraries", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -70,6 +70,18 @@ /** | ||
protected _inheritingObservers: boolean; | ||
/** | ||
* Creates a new instance of Timeline with the supplied moments and optionally any observers to include | ||
* | ||
* @param moments The moment object defining this timeline | ||
* @param observers Any observers to include (optional) | ||
*/ | ||
constructor(moments: T, observers?: ObserverCollection); | ||
/** | ||
* Apply the supplied behavior(s) to this timeline | ||
* | ||
* @param behaviors One or more behaviors | ||
* @returns `this` Timeline | ||
*/ | ||
using(...behaviors: TimelinePipe[]): this; | ||
/** | ||
* Property allowing access to subscribe observers to all the moments within this timeline | ||
* Property allowing access to manage observers on moments within this timeline | ||
*/ | ||
@@ -109,2 +121,7 @@ get on(): OnProxyType<T>; | ||
protected abstract execute(init?: any): Promise<any>; | ||
/** | ||
* By default a timeline references the same observer collection as a parent timeline, | ||
* if any changes are made to the observers this method first clones them ensuring we | ||
* maintain a local copy and de-ref the parent | ||
*/ | ||
protected cloneObserversOnChange(): void; | ||
@@ -111,0 +128,0 @@ } |
@@ -11,2 +11,8 @@ "use strict"; | ||
class Timeline { | ||
/** | ||
* Creates a new instance of Timeline with the supplied moments and optionally any observers to include | ||
* | ||
* @param moments The moment object defining this timeline | ||
* @param observers Any observers to include (optional) | ||
*/ | ||
constructor(moments, observers = {}) { | ||
@@ -19,2 +25,8 @@ this.moments = moments; | ||
} | ||
/** | ||
* Apply the supplied behavior(s) to this timeline | ||
* | ||
* @param behaviors One or more behaviors | ||
* @returns `this` Timeline | ||
*/ | ||
using(...behaviors) { | ||
@@ -27,3 +39,3 @@ for (let i = 0; i < behaviors.length; i++) { | ||
/** | ||
* Property allowing access to subscribe observers to all the moments within this timeline | ||
* Property allowing access to manage observers on moments within this timeline | ||
*/ | ||
@@ -136,5 +148,7 @@ get on() { | ||
try { | ||
// provide an opportunity for cleanup of the timeline | ||
this.emit.dispose(); | ||
} | ||
catch (e) { | ||
// shouldn't happen, but possible dispose throws - which may be missed as the usercode await will have resolved. | ||
const e2 = Object.assign(Error("Error in dispose."), { | ||
@@ -147,2 +161,7 @@ innerException: e, | ||
} | ||
/** | ||
* By default a timeline references the same observer collection as a parent timeline, | ||
* if any changes are made to the observers this method first clones them ensuring we | ||
* maintain a local copy and de-ref the parent | ||
*/ | ||
cloneObserversOnChange() { | ||
@@ -149,0 +168,0 @@ if (this._inheritingObservers) { |
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
79181
1289