Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function emulateProductionBuild(enable?: boolean): void;
// @alpha
export function nonProductionConditionalsIncluded(): boolean;

// @alpha
// @beta
export function onAssertionFailure(handler: (error: Error) => void): () => void;

// (No @packageDocumentation comment for this package)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

```ts

// @beta
export function onAssertionFailure(handler: (error: Error) => void): () => void;

// (No @packageDocumentation comment for this package)

```
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export class LazyPromise<T> implements 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>;
}

// @beta
export function onAssertionFailure(handler: (error: Error) => void): () => void;

// @beta @legacy
export class PromiseCache<TKey, TResult> {
constructor(input?: PromiseCacheOptions);
Expand Down
4 changes: 2 additions & 2 deletions packages/common/core-utils/src/assert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const firstChanceAssertionHandler = new Set<(error: Error) => void>();
* This does not replace the need for error handling elsewhere since errors (even bugs in Fluid) can cause other kinds of exceptions which this cannot run the callback for.
* @example
* ```ts
* import { onAssertionFailure } from "fluid-framework/alpha";
* import { onAssertionFailure } from "fluid-framework/beta";
*
* let firstAssertion: Error | undefined;
*
Expand All @@ -114,7 +114,7 @@ const firstChanceAssertionHandler = new Set<(error: Error) => void>();
* firstAssertion ??= error;
* });
* ```
* @alpha
* @beta
*/
export function onAssertionFailure(handler: (error: Error) => void): () => void {
// To avoid issues if the same callback is registered twice (mainly it not triggering twice and the first unregister removing it),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ export interface ObservationResults<TResult> {
// @public
export type Off = () => void;

// @alpha
// @beta
export function onAssertionFailure(handler: (error: Error) => void): () => void;

// @alpha
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,9 @@ export interface ObjectSchemaOptions<TCustomMetadata = unknown> extends NodeSche
// @public
export type Off = () => void;

// @beta
export function onAssertionFailure(handler: (error: Error) => void): () => void;

// @beta @system
export type PopUnion<Union, AsOverloadedFunction = UnionToIntersection<Union extends unknown ? (f: Union) => void : never>> = AsOverloadedFunction extends (a: infer First) => void ? First : never;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,9 @@ export interface ObjectSchemaOptions<TCustomMetadata = unknown> extends NodeSche
// @public
export type Off = () => void;

// @beta
export function onAssertionFailure(handler: (error: Error) => void): () => void;

// @beta @system
export type PopUnion<Union, AsOverloadedFunction = UnionToIntersection<Union extends unknown ? (f: Union) => void : never>> = AsOverloadedFunction extends (a: infer First) => void ? First : never;

Expand Down
2 changes: 1 addition & 1 deletion packages/framework/fluid-framework/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export type {
FluidReadonlyMap,
} from "@fluidframework/core-interfaces/internal";

// This is an alpha API, but this package doesn't have an alpha entry point so its imported from "internal".
// This is a beta API, but core-utils doesn't have a beta entry point so it's imported from "internal".
export { onAssertionFailure } from "@fluidframework/core-utils/internal";

export type { isFluidHandle } from "@fluidframework/runtime-utils";
Expand Down
Loading