@fluidframework/core-utils
Advanced tools
Comparing version 2.0.0-dev.7.4.0.221926 to 2.0.0-dev-rc.1.0.0.224419
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
"extends": "../../../common/build/build-common/api-extractor-lint.json", | ||
"messages": { | ||
"extractorMessageReporting": { | ||
// TODO: remove once base config has this enabled as an error | ||
"ae-incompatible-release-tags": { | ||
"logLevel": "error", | ||
"addToApiReportFile": false | ||
} | ||
} | ||
} | ||
"extends": "../../../common/build/build-common/api-extractor-lint.json" | ||
} |
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
"extends": "../../../common/build/build-common/api-extractor-base.json", | ||
"messages": { | ||
"extractorMessageReporting": { | ||
// TODO: Add missing documentation and remove this rule override | ||
"ae-undocumented": { | ||
"logLevel": "none" | ||
} | ||
} | ||
} | ||
"extends": "../../../common/build/build-common/api-extractor-base.json" | ||
} |
@@ -7,6 +7,6 @@ ## API Report File for "@fluidframework/core-utils" | ||
// @internal | ||
// @alpha | ||
export function assert(condition: boolean, message: string | number): asserts condition; | ||
// @internal | ||
// @alpha | ||
export const compareArrays: <T>(left: readonly T[], right: readonly T[], comparator?: (leftItem: T, rightItem: T, index: number) => boolean) => boolean; | ||
@@ -33,4 +33,4 @@ | ||
count(): number; | ||
get(): T; | ||
peek(): IHeapNode<T>; | ||
get(): T | undefined; | ||
peek(): IHeapNode<T> | undefined; | ||
remove(node: IHeapNode<T>): void; | ||
@@ -79,3 +79,3 @@ update(node: IHeapNode<T>): void; | ||
// @internal | ||
// @alpha | ||
export class LazyPromise<T> implements Promise<T> { | ||
@@ -82,0 +82,0 @@ // (undocumented) |
# @fluidframework/core-utils | ||
## 2.0.0-internal.8.0.0 | ||
Dependency updates only. | ||
## 2.0.0-internal.7.4.0 | ||
@@ -4,0 +8,0 @@ |
@@ -14,5 +14,5 @@ /*! | ||
* use numbered error codes instead. | ||
* @internal | ||
* @alpha | ||
*/ | ||
export declare function assert(condition: boolean, message: string | number): asserts condition; | ||
//# sourceMappingURL=assert.d.ts.map |
@@ -17,3 +17,3 @@ "use strict"; | ||
* use numbered error codes instead. | ||
* @internal | ||
* @alpha | ||
*/ | ||
@@ -20,0 +20,0 @@ function assert(condition, message) { |
@@ -8,3 +8,3 @@ /*! | ||
* | ||
* @internal | ||
* @alpha | ||
* | ||
@@ -11,0 +11,0 @@ * @param left - The first array to compare |
@@ -11,3 +11,3 @@ "use strict"; | ||
* | ||
* @internal | ||
* @alpha | ||
* | ||
@@ -14,0 +14,0 @@ * @param left - The first array to compare |
@@ -1,4 +0,25 @@ | ||
/* Excluded from this release type: assert */ | ||
/** | ||
* A browser friendly assert library. | ||
* Use this instead of the 'assert' package, which has a big impact on bundle sizes. | ||
* @param condition - The condition that should be true, if the condition is false an error will be thrown. | ||
* Only use this API when `false` indicates a logic error in the problem and thus a bug that should be fixed. | ||
* @param message - The message to include in the error when the condition does not hold. | ||
* A number should not be specified manually: use a string. | ||
* Before a release, policy-check should be run, which will convert any asserts still using strings to | ||
* use numbered error codes instead. | ||
* @alpha | ||
*/ | ||
export declare function assert(condition: boolean, message: string | number): asserts condition; | ||
/* Excluded from this release type: compareArrays */ | ||
/** | ||
* Compare two arrays. Returns true if their elements are equivalent and in the same order. | ||
* | ||
* @alpha | ||
* | ||
* @param left - The first array to compare | ||
* @param right - The second array to compare | ||
* @param comparator - The function used to check if two `T`s are equivalent. | ||
* Defaults to `Object.is()` equality (a shallow compare where NaN = NaN and -0 ≠ 0) | ||
*/ | ||
export declare const compareArrays: <T>(left: readonly T[], right: readonly T[], comparator?: (leftItem: T, rightItem: T, index: number) => boolean) => boolean; | ||
@@ -55,3 +76,19 @@ /** | ||
/* Excluded from this release type: LazyPromise */ | ||
/** | ||
* A lazy evaluated promise. The execute function is delayed until | ||
* the promise is used, e.g. await, then, catch ... | ||
* The execute function is only called once. | ||
* All calls are then proxied to the promise returned by the execute method. | ||
* @alpha | ||
*/ | ||
export declare class LazyPromise<T> implements Promise<T> { | ||
private readonly execute; | ||
get [Symbol.toStringTag](): string; | ||
private result; | ||
constructor(execute: () => Promise<T>); | ||
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>; | ||
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<T | TResult>; | ||
finally(onfinally?: (() => void) | null | undefined): Promise<T>; | ||
private getPromise; | ||
} | ||
@@ -58,0 +95,0 @@ /* Excluded from this release type: NumberComparer */ |
@@ -10,3 +10,3 @@ /** | ||
* use numbered error codes instead. | ||
* @internal | ||
* @alpha | ||
*/ | ||
@@ -18,3 +18,3 @@ export declare function assert(condition: boolean, message: string | number): asserts condition; | ||
* | ||
* @internal | ||
* @alpha | ||
* | ||
@@ -86,3 +86,3 @@ * @param left - The first array to compare | ||
*/ | ||
peek(): IHeapNode<T>; | ||
peek(): IHeapNode<T> | undefined; | ||
/** | ||
@@ -93,3 +93,3 @@ * Get and remove the smallest element in the heap as determined by the order of the comparer | ||
*/ | ||
get(): T; | ||
get(): T | undefined; | ||
/** | ||
@@ -216,3 +216,3 @@ * Add a value to the heap | ||
* All calls are then proxied to the promise returned by the execute method. | ||
* @internal | ||
* @alpha | ||
*/ | ||
@@ -219,0 +219,0 @@ export declare class LazyPromise<T> implements Promise<T> { |
@@ -51,3 +51,3 @@ /*! | ||
*/ | ||
peek(): IHeapNode<T>; | ||
peek(): IHeapNode<T> | undefined; | ||
/** | ||
@@ -58,3 +58,3 @@ * Get and remove the smallest element in the heap as determined by the order of the comparer | ||
*/ | ||
get(): T; | ||
get(): T | undefined; | ||
/** | ||
@@ -61,0 +61,0 @@ * Add a value to the heap |
@@ -50,2 +50,5 @@ "use strict"; | ||
get() { | ||
if (this.L.length === 0) { | ||
return undefined; | ||
} | ||
this.swap(1, this.count()); | ||
@@ -52,0 +55,0 @@ const x = this.L.pop(); |
@@ -32,3 +32,3 @@ /*! | ||
* All calls are then proxied to the promise returned by the execute method. | ||
* @internal | ||
* @alpha | ||
*/ | ||
@@ -35,0 +35,0 @@ export declare class LazyPromise<T> implements Promise<T> { |
@@ -45,3 +45,3 @@ "use strict"; | ||
* All calls are then proxied to the promise returned by the execute method. | ||
* @internal | ||
* @alpha | ||
*/ | ||
@@ -48,0 +48,0 @@ class LazyPromise { |
@@ -14,5 +14,5 @@ /*! | ||
* use numbered error codes instead. | ||
* @internal | ||
* @alpha | ||
*/ | ||
export declare function assert(condition: boolean, message: string | number): asserts condition; | ||
//# sourceMappingURL=assert.d.ts.map |
@@ -17,3 +17,3 @@ "use strict"; | ||
* use numbered error codes instead. | ||
* @internal | ||
* @alpha | ||
*/ | ||
@@ -20,0 +20,0 @@ function assert(condition, message) { |
@@ -8,3 +8,3 @@ /*! | ||
* | ||
* @internal | ||
* @alpha | ||
* | ||
@@ -11,0 +11,0 @@ * @param left - The first array to compare |
@@ -11,3 +11,3 @@ "use strict"; | ||
* | ||
* @internal | ||
* @alpha | ||
* | ||
@@ -14,0 +14,0 @@ * @param left - The first array to compare |
@@ -1,4 +0,25 @@ | ||
/* Excluded from this release type: assert */ | ||
/** | ||
* A browser friendly assert library. | ||
* Use this instead of the 'assert' package, which has a big impact on bundle sizes. | ||
* @param condition - The condition that should be true, if the condition is false an error will be thrown. | ||
* Only use this API when `false` indicates a logic error in the problem and thus a bug that should be fixed. | ||
* @param message - The message to include in the error when the condition does not hold. | ||
* A number should not be specified manually: use a string. | ||
* Before a release, policy-check should be run, which will convert any asserts still using strings to | ||
* use numbered error codes instead. | ||
* @alpha | ||
*/ | ||
export declare function assert(condition: boolean, message: string | number): asserts condition; | ||
/* Excluded from this release type: compareArrays */ | ||
/** | ||
* Compare two arrays. Returns true if their elements are equivalent and in the same order. | ||
* | ||
* @alpha | ||
* | ||
* @param left - The first array to compare | ||
* @param right - The second array to compare | ||
* @param comparator - The function used to check if two `T`s are equivalent. | ||
* Defaults to `Object.is()` equality (a shallow compare where NaN = NaN and -0 ≠ 0) | ||
*/ | ||
export declare const compareArrays: <T>(left: readonly T[], right: readonly T[], comparator?: (leftItem: T, rightItem: T, index: number) => boolean) => boolean; | ||
@@ -55,3 +76,19 @@ /** | ||
/* Excluded from this release type: LazyPromise */ | ||
/** | ||
* A lazy evaluated promise. The execute function is delayed until | ||
* the promise is used, e.g. await, then, catch ... | ||
* The execute function is only called once. | ||
* All calls are then proxied to the promise returned by the execute method. | ||
* @alpha | ||
*/ | ||
export declare class LazyPromise<T> implements Promise<T> { | ||
private readonly execute; | ||
get [Symbol.toStringTag](): string; | ||
private result; | ||
constructor(execute: () => Promise<T>); | ||
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>; | ||
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<T | TResult>; | ||
finally(onfinally?: (() => void) | null | undefined): Promise<T>; | ||
private getPromise; | ||
} | ||
@@ -58,0 +95,0 @@ /* Excluded from this release type: NumberComparer */ |
@@ -10,3 +10,3 @@ /** | ||
* use numbered error codes instead. | ||
* @internal | ||
* @alpha | ||
*/ | ||
@@ -18,3 +18,3 @@ export declare function assert(condition: boolean, message: string | number): asserts condition; | ||
* | ||
* @internal | ||
* @alpha | ||
* | ||
@@ -86,3 +86,3 @@ * @param left - The first array to compare | ||
*/ | ||
peek(): IHeapNode<T>; | ||
peek(): IHeapNode<T> | undefined; | ||
/** | ||
@@ -93,3 +93,3 @@ * Get and remove the smallest element in the heap as determined by the order of the comparer | ||
*/ | ||
get(): T; | ||
get(): T | undefined; | ||
/** | ||
@@ -216,3 +216,3 @@ * Add a value to the heap | ||
* All calls are then proxied to the promise returned by the execute method. | ||
* @internal | ||
* @alpha | ||
*/ | ||
@@ -219,0 +219,0 @@ export declare class LazyPromise<T> implements Promise<T> { |
@@ -51,3 +51,3 @@ /*! | ||
*/ | ||
peek(): IHeapNode<T>; | ||
peek(): IHeapNode<T> | undefined; | ||
/** | ||
@@ -58,3 +58,3 @@ * Get and remove the smallest element in the heap as determined by the order of the comparer | ||
*/ | ||
get(): T; | ||
get(): T | undefined; | ||
/** | ||
@@ -61,0 +61,0 @@ * Add a value to the heap |
@@ -50,2 +50,5 @@ "use strict"; | ||
get() { | ||
if (this.L.length === 0) { | ||
return undefined; | ||
} | ||
this.swap(1, this.count()); | ||
@@ -52,0 +55,0 @@ const x = this.L.pop(); |
@@ -32,3 +32,3 @@ /*! | ||
* All calls are then proxied to the promise returned by the execute method. | ||
* @internal | ||
* @alpha | ||
*/ | ||
@@ -35,0 +35,0 @@ export declare class LazyPromise<T> implements Promise<T> { |
@@ -45,3 +45,3 @@ "use strict"; | ||
* All calls are then proxied to the promise returned by the execute method. | ||
* @internal | ||
* @alpha | ||
*/ | ||
@@ -48,0 +48,0 @@ class LazyPromise { |
{ | ||
"name": "@fluidframework/core-utils", | ||
"version": "2.0.0-dev.7.4.0.221926", | ||
"version": "2.0.0-dev-rc.1.0.0.224419", | ||
"description": "Not intended for use outside the Fluid client repo.", | ||
@@ -21,9 +21,9 @@ "homepage": "https://fluidframework.com", | ||
"exclude": [ | ||
"src/test/**/*.ts", | ||
"dist/test/**/*.js" | ||
"src/test/**/*.*ts", | ||
"dist/test/**/*.*js" | ||
], | ||
"exclude-after-remap": false, | ||
"include": [ | ||
"src/**/*.ts", | ||
"dist/**/*.js" | ||
"src/**/*.*ts", | ||
"dist/**/*.*js" | ||
], | ||
@@ -41,7 +41,7 @@ "report-dir": "nyc/report", | ||
"@fluid-tools/benchmark": "^0.47.0", | ||
"@fluid-tools/build-cli": "^0.28.0", | ||
"@fluid-tools/build-cli": "0.29.0-222379", | ||
"@fluidframework/build-common": "^2.0.3", | ||
"@fluidframework/build-tools": "^0.28.0", | ||
"@fluidframework/build-tools": "0.29.0-222379", | ||
"@fluidframework/eslint-config-fluid": "^3.1.0", | ||
"@fluidframework/mocha-test-setup": "2.0.0-dev.7.4.0.221926", | ||
"@fluidframework/mocha-test-setup": "2.0.0-dev-rc.1.0.0.224419", | ||
"@microsoft/api-extractor": "^7.38.3", | ||
@@ -48,0 +48,0 @@ "@types/mocha": "^9.1.1", |
@@ -15,3 +15,3 @@ /*! | ||
* use numbered error codes instead. | ||
* @internal | ||
* @alpha | ||
*/ | ||
@@ -18,0 +18,0 @@ export function assert(condition: boolean, message: string | number): asserts condition { |
@@ -9,3 +9,3 @@ /*! | ||
* | ||
* @internal | ||
* @alpha | ||
* | ||
@@ -12,0 +12,0 @@ * @param left - The first array to compare |
@@ -70,3 +70,3 @@ /*! | ||
*/ | ||
public peek(): IHeapNode<T> { | ||
public peek(): IHeapNode<T> | undefined { | ||
return this.L[1]; | ||
@@ -80,3 +80,7 @@ } | ||
*/ | ||
public get(): T { | ||
public get(): T | undefined { | ||
if (this.L.length === 0) { | ||
return undefined; | ||
} | ||
this.swap(1, this.count()); | ||
@@ -83,0 +87,0 @@ const x = this.L.pop(); |
@@ -44,3 +44,3 @@ /*! | ||
* All calls are then proxied to the promise returned by the execute method. | ||
* @internal | ||
* @alpha | ||
*/ | ||
@@ -47,0 +47,0 @@ export class LazyPromise<T> implements Promise<T> { |
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
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
277862
4512