Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fluidframework/core-interfaces

Package Overview
Dependencies
Maintainers
2
Versions
466
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluidframework/core-interfaces - npm Package Compare versions

Comparing version 2.0.0-dev.7.4.0.215930 to 2.0.0-dev.7.4.0.216897

api-extractor-lint.json

4

api-extractor.json

@@ -6,6 +6,2 @@ {

"extractorMessageReporting": {
"ae-missing-release-tag": {
// TODO: Fix violations and remove this rule override
"logLevel": "none"
},
// TODO: Add missing documentation and remove this rule override

@@ -12,0 +8,0 @@ "ae-undocumented": {

@@ -7,6 +7,6 @@ ## API Report File for "@fluidframework/core-interfaces"

// @public
// @internal
export type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;
// @public
// @internal
export const FluidErrorTypes: {

@@ -20,6 +20,6 @@ readonly genericError: "genericError";

// @public (undocumented)
// @internal (undocumented)
export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];
// @public
// @internal
export type FluidObject<T = unknown> = {

@@ -29,9 +29,9 @@ [P in FluidObjectProviderKeys<T>]?: T[P];

// @public
// @internal
export type FluidObjectKeys<T> = keyof FluidObject<T>;
// @public
// @internal
export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
// @public
// @internal
export interface IDisposable {

@@ -42,3 +42,3 @@ dispose(error?: Error): void;

// @public
// @internal
export interface IErrorBase extends Partial<Error> {

@@ -52,3 +52,3 @@ readonly errorType: string;

// @public
// @internal
export interface IErrorEvent extends IEvent {

@@ -59,3 +59,3 @@ // @eventProperty

// @public
// @internal
export interface IEvent {

@@ -66,3 +66,3 @@ // @eventProperty

// @public
// @internal
export interface IEventProvider<TEvent extends IEvent> {

@@ -74,3 +74,3 @@ readonly off: IEventTransformer<this, TEvent>;

// @public
// @internal
export type IEventThisPlaceHolder = {

@@ -80,3 +80,3 @@ thisPlaceHolder: "thisPlaceHolder";

// @public
// @internal
export type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {

@@ -234,3 +234,3 @@ (event: infer E0, listener: (...args: infer A0) => void): any;

// @public @deprecated
// @internal @deprecated
export interface IFluidCodeDetails {

@@ -241,6 +241,6 @@ readonly config?: IFluidCodeDetailsConfig;

// @public @deprecated (undocumented)
// @internal @deprecated (undocumented)
export const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
// @public @deprecated
// @internal @deprecated
export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {

@@ -251,3 +251,3 @@ compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;

// @public @deprecated
// @internal @deprecated
export interface IFluidCodeDetailsConfig {

@@ -258,6 +258,6 @@ // (undocumented)

// @public (undocumented)
// @internal (undocumented)
export const IFluidHandle: keyof IProvideFluidHandle;
// @public
// @internal
export interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvideFluidHandle {

@@ -274,6 +274,6 @@ // @deprecated (undocumented)

// @public (undocumented)
// @internal (undocumented)
export const IFluidHandleContext: keyof IProvideFluidHandleContext;
// @public
// @internal
export interface IFluidHandleContext extends IProvideFluidHandleContext {

@@ -288,6 +288,6 @@ readonly absolutePath: string;

// @public (undocumented)
// @internal (undocumented)
export const IFluidLoadable: keyof IProvideFluidLoadable;
// @public
// @internal
export interface IFluidLoadable extends IProvideFluidLoadable {

@@ -298,3 +298,3 @@ // (undocumented)

// @public @deprecated
// @internal @deprecated
export interface IFluidPackage {

@@ -308,3 +308,3 @@ [key: string]: unknown;

// @public @deprecated
// @internal @deprecated
export interface IFluidPackageEnvironment {

@@ -317,6 +317,6 @@ [target: string]: undefined | {

// @public @deprecated (undocumented)
// @internal @deprecated (undocumented)
export const IFluidRouter: keyof IProvideFluidRouter;
// @public @deprecated (undocumented)
// @internal @deprecated (undocumented)
export interface IFluidRouter extends IProvideFluidRouter {

@@ -327,6 +327,6 @@ // (undocumented)

// @public (undocumented)
// @internal (undocumented)
export const IFluidRunnable: keyof IProvideFluidRunnable;
// @public (undocumented)
// @internal (undocumented)
export interface IFluidRunnable {

@@ -339,3 +339,3 @@ // (undocumented)

// @public
// @internal
export interface IGenericError extends IErrorBase {

@@ -347,3 +347,3 @@ // (undocumented)

// @public
// @internal
export interface ILoggingError extends Error {

@@ -353,3 +353,3 @@ getTelemetryProperties(): ITelemetryBaseProperties;

// @public @deprecated (undocumented)
// @internal @deprecated (undocumented)
export interface IProvideFluidCodeDetailsComparer {

@@ -360,3 +360,3 @@ // (undocumented)

// @public (undocumented)
// @internal (undocumented)
export interface IProvideFluidHandle {

@@ -367,3 +367,3 @@ // (undocumented)

// @public (undocumented)
// @internal (undocumented)
export interface IProvideFluidHandleContext {

@@ -374,3 +374,3 @@ // (undocumented)

// @public (undocumented)
// @internal (undocumented)
export interface IProvideFluidLoadable {

@@ -381,3 +381,3 @@ // (undocumented)

// @public @deprecated
// @internal @deprecated
export interface IProvideFluidRouter {

@@ -388,3 +388,3 @@ // (undocumented)

// @public (undocumented)
// @internal (undocumented)
export interface IProvideFluidRunnable {

@@ -395,3 +395,3 @@ // (undocumented)

// @public (undocumented)
// @internal (undocumented)
export interface IRequest {

@@ -404,3 +404,3 @@ // (undocumented)

// @public (undocumented)
// @internal (undocumented)
export interface IRequestHeader {

@@ -411,3 +411,3 @@ // (undocumented)

// @public (undocumented)
// @internal (undocumented)
export interface IResponse {

@@ -428,9 +428,9 @@ // (undocumented)

// @public @deprecated (undocumented)
// @internal @deprecated (undocumented)
export const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
// @public @deprecated
// @internal @deprecated
export const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;
// @public @deprecated (undocumented)
// @internal @deprecated (undocumented)
export interface ITaggedTelemetryPropertyType {

@@ -443,3 +443,3 @@ // (undocumented)

// @public
// @internal
export interface ITelemetryBaseEvent extends ITelemetryBaseProperties {

@@ -452,3 +452,3 @@ // (undocumented)

// @public
// @internal
export interface ITelemetryBaseLogger {

@@ -461,6 +461,6 @@ // (undocumented)

// @public
// @internal
export type ITelemetryBaseProperties = ITelemetryProperties;
// @public @deprecated
// @internal @deprecated
export interface ITelemetryErrorEvent extends ITelemetryProperties {

@@ -471,3 +471,3 @@ // (undocumented)

// @public @deprecated
// @internal @deprecated
export interface ITelemetryGenericEvent extends ITelemetryProperties {

@@ -480,3 +480,3 @@ // (undocumented)

// @public @deprecated
// @internal @deprecated
export interface ITelemetryLogger extends ITelemetryBaseLogger {

@@ -489,3 +489,3 @@ send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;

// @public @deprecated
// @internal @deprecated
export interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {

@@ -496,3 +496,3 @@ // (undocumented)

// @public @deprecated
// @internal @deprecated
export interface ITelemetryProperties {

@@ -503,3 +503,3 @@ // (undocumented)

// @public
// @internal
export interface IThrottlingWarning extends IErrorBase {

@@ -511,3 +511,3 @@ readonly errorType: typeof FluidErrorTypes.throttlingError;

// @public
// @internal
export interface IUsageError extends IErrorBase {

@@ -517,3 +517,3 @@ readonly errorType: typeof FluidErrorTypes.usageError;

// @public
// @internal
export const LogLevel: {

@@ -525,6 +525,6 @@ readonly verbose: 10;

// @public
// @internal
export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
// @public
// @internal
export type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {

@@ -534,3 +534,3 @@ [K in keyof L]: L[K] extends IEventThisPlaceHolder ? TThis : L[K];

// @public
// @internal
export interface Tagged<V, T extends string = string> {

@@ -543,12 +543,12 @@ // (undocumented)

// @public
// @internal
export type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;
// @public @deprecated
// @internal @deprecated
export type TelemetryEventCategory = "generic" | "error" | "performance";
// @public @deprecated
// @internal @deprecated
export type TelemetryEventPropertyType = string | number | boolean | undefined;
// @public
// @internal
export type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;

@@ -555,0 +555,0 @@

@@ -1,907 +0,107 @@

/**
* Allows an interface to extend interfaces that already extend an {@link IEventProvider}.
*
* @example
*
* ``` typescript
* interface AEvents extends IEvent{
* (event: "a-event",listener: (a: number)=>void);
* }
* interface A extends IEventProvider<AEvents>{
* a: object;
* }
*
* interface BEvents extends IEvent{
* (event: "b-event",listener: (b: string)=>void);
* }
* interface B extends ExtendEventProvider<AEvents, A, BEvents>{
* b: boolean;
* };
* ```
*
* interface B will now extend interface A and its events
*
*/
export declare type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;
/* Excluded from this release type: ExtendEventProvider */
/**
* Error types the Fluid Framework may report.
*/
export declare const FluidErrorTypes: {
/**
* Some error, most likely an exception caught by runtime and propagated to container as critical error
*/
readonly genericError: "genericError";
/**
* Throttling error from server. Server is busy and is asking not to reconnect for some time
*/
readonly throttlingError: "throttlingError";
/**
* Data loss error detected by Container / DeltaManager. Likely points to storage issue.
*/
readonly dataCorruptionError: "dataCorruptionError";
/**
* Error encountered when processing an operation. May correlate with data corruption.
*/
readonly dataProcessingError: "dataProcessingError";
/**
* Error indicating an API is being used improperly resulting in an invalid operation.
*/
readonly usageError: "usageError";
};
/* Excluded from this release type: FluidErrorTypes */
export declare type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];
/* Excluded from this release type: FluidObject */
/**
* This utility type take interface(s) that follow the FluidObject pattern, and produces
* a new type that can be used for inspection and discovery of those interfaces.
*
* It is meant to be used with types that are known to implement the FluidObject pattern.
* A common way to specify a type implements the FluidObject pattern is to expose it as a
* FluidObject without a generic argument.
*
* @example
*
* For example, if we have an interface like the following:
*
* ```typescript
* interface IProvideFoo{
* IFoo: IFoo
* }
* interface IFoo extends IProvideFoo{
* foobar();
* }
* ```
*
* and a function that returns a FluidObject. You would do the following
*
* `const maybeFoo: FluidObject<IFoo> = getFluidObject()`;
*
* Either IFoo or IProvideFoo are valid generic arguments. In both case
* maybeFoo will be of type `{IFoo?: IFoo}`. If IFoo is not undefined,
* then the FluidObject provides IFoo, and it can be used.
*
* You can inspect multiple types via a intersection. For example:
* `FluidObject<IFoo & IBar>`
*
*/
export declare type FluidObject<T = unknown> = {
[P in FluidObjectProviderKeys<T>]?: T[P];
};
/* Excluded from this release type: FluidObjectKeys */
/**
* This utility type creates a type that is the union of all keys on the generic type
* which implement the FluidObject pattern.
*
* See {@link FluidObject}
*
* For example `FluidObjectKeys<IFoo & IBar>` would result in `"IFoo" | "IBar"`
*
*/
export declare type FluidObjectKeys<T> = keyof FluidObject<T>;
/* Excluded from this release type: FluidObjectProviderKeys */
/**
* Produces a valid FluidObject key given a type and a property.
*
* @remarks
*
* A valid FluidObject key is a property that exists on the incoming type
* as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`
* This aligns with the FluidObject pattern expected to be used with all FluidObjects.
*
* This utility type is meant for internal use by {@link FluidObject}
*
* @example
*
* ```typescript
* interface IProvideFoo{
* IFoo: IFoo
* }
* interface IFoo extends IProvideFoo{
* foobar();
* }
* ```
*
* This pattern enables discovery, and delegation in a standard way which is central
* to FluidObject pattern.
*/
export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
/* Excluded from this release type: IDisposable */
/**
* Base interface for objects that require lifetime management via explicit disposal.
*/
export declare interface IDisposable {
/**
* Whether or not the object has been disposed.
* If true, the object should be considered invalid, and its other state should be disregarded.
*/
readonly disposed: boolean;
/**
* Dispose of the object and its resources.
* @param error - Optional error indicating the reason for the disposal, if the object was
* disposed as the result of an error.
*/
dispose(error?: Error): void;
}
/* Excluded from this release type: IErrorBase */
/**
* Base interface for all errors and warnings emitted the container.
*
* @remarks
*
* We are in the process of unifying error types across layers of the Framework. For now we have only migrated
* those from container-definitions. Once fully migrated, this will be a base interface for all errors and
* warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.
* Runtime and others will follow soon.
*/
export declare interface IErrorBase extends Partial<Error> {
/**
* A type tag differentiating kinds of errors emitted by the container.
*
* @see See {@link FluidErrorTypes#genericError} for some common examples.
* - container
* - runtime
* - drivers
*/
readonly errorType: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}
*
* @remarks
*
* Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)
* If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result
* of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.
*/
readonly message: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}
*/
readonly name?: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}
*/
readonly stack?: string;
/**
* Returns all properties of this error object that are fit for logging.
* Some may be tagged to indicate they contain some kind of sensitive data.
*/
getTelemetryProperties?(): ITelemetryBaseProperties;
}
/* Excluded from this release type: IErrorEvent */
/**
* Base interface for error event emitters.
*/
export declare interface IErrorEvent extends IEvent {
/**
* Base error event emitter signature.
*
* @eventProperty
*/
(event: "error", listener: (message: any) => void): any;
}
/* Excluded from this release type: IEvent */
/**
* Base interface for event emitters.
*/
export declare interface IEvent {
/**
* Base event emitter signature.
*
* @remarks The event emitter polyfill and the node event emitter have different event types:
* `string | symbol` vs. `string | number`.
*
* So for our typing we'll contrain to string, that way we work with both.
*
* @eventProperty
*/
(event: string, listener: (...args: any[]) => void): any;
}
/* Excluded from this release type: IEventProvider */
/**
* Base interface for event providers.
*/
export declare interface IEventProvider<TEvent extends IEvent> {
/**
* Registers a callback to be invoked when the corresponding event is triggered.
*/
readonly on: IEventTransformer<this, TEvent>;
/**
* Registers a callback to be invoked the first time (after registration) the corresponding event is triggered.
*/
readonly once: IEventTransformer<this, TEvent>;
/**
* Removes the corresponding event if it has been registered.
*/
readonly off: IEventTransformer<this, TEvent>;
}
/* Excluded from this release type: IEventThisPlaceHolder */
/**
* The placeholder type that should be used instead of `this` in events.
*/
export declare type IEventThisPlaceHolder = {
thisPlaceHolder: "thisPlaceHolder";
};
/* Excluded from this release type: IEventTransformer */
/**
* This type is a conditional type for transforming all the overloads provided in `TEvent`.
*
* @remarks
* Due to limitations of the TypeScript typing system, we need to handle each number of overload individually.
* It currently supports the max of 15 event overloads which is more than we use anywhere.
* At more than 15 overloads we start to hit {@link https://github.com/microsoft/TypeScript/issues/37209 | TS2589}.
* If we need to move beyond 15 we should evaluate using a mapped type pattern like `{"event":(listenerArgs)=>void}`
*/
export declare type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: infer E13, listener: (...args: infer A13) => void): any;
(event: infer E14, listener: (...args: infer A14) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> & TransformedEvent<TThis, E13, A13> & TransformedEvent<TThis, E14, A14> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: infer E13, listener: (...args: infer A13) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> & TransformedEvent<TThis, E13, A13> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> : TransformedEvent<TThis, string, any[]>;
/* Excluded from this release type: IFluidCodeDetails */
/**
* Data structure used to describe the code to load on the Fluid document.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetails}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetails {
/**
* The code package to be used on the Fluid document. This is either the package name which will be loaded
* from a package manager. Or the expanded Fluid package.
*/
readonly package: string | Readonly<IFluidPackage>;
/**
* Configuration details. This includes links to the package manager and base CDNs.
*/
readonly config?: IFluidCodeDetailsConfig;
}
/* Excluded from this release type: IFluidCodeDetailsComparer */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
/* Excluded from this release type: IFluidCodeDetailsConfig */
/**
* Provides capability to compare Fluid code details.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
/**
* Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.
*
* Similar semantics to:
* {@link https://github.com/npm/node-semver#usage}
*/
satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
/**
* Returns a number representing the ascending sort order of the `a` and `b` code details:
*
* - `< 0` if `a < b`.
*
* - `= 0` if `a === b`.
*
* - `> 0` if `a > b`.
*
* - `undefined` if `a` is not comparable to `b`.
*
* Similar semantics to:
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description | Array.sort}
*/
compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
}
/* Excluded from this release type: IFluidHandle */
/**
* Package manager configuration. Provides a key value mapping of config values.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsConfig}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetailsConfig {
readonly [key: string]: string;
}
/* Excluded from this release type: IFluidHandleContext */
export declare const IFluidHandle: keyof IProvideFluidHandle;
/* Excluded from this release type: IFluidLoadable */
/**
* Handle to a shared {@link FluidObject}.
*/
export declare interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvideFluidHandle {
/**
* @deprecated Do not use handle's path for routing. Use `get` to get the underlying object.
*
* The absolute path to the handle context from the root.
*/
readonly absolutePath: string;
/**
* Flag indicating whether or not the entity has services attached.
*/
readonly isAttached: boolean;
/**
* @deprecated To be removed. This is part of an internal API surface and should not be called.
*
* Runs through the graph and attach the bounded handles.
*/
attachGraph(): void;
/**
* Returns a promise to the Fluid Object referenced by the handle.
*/
get(): Promise<T>;
/**
* @deprecated To be removed. This is part of an internal API surface and should not be called.
*
* Binds the given handle to this one or attach the given handle if this handle is attached.
* A bound handle will also be attached once this handle is attached.
*/
bind(handle: IFluidHandle): void;
}
/* Excluded from this release type: IFluidPackage */
export declare const IFluidHandleContext: keyof IProvideFluidHandleContext;
/* Excluded from this release type: IFluidPackageEnvironment */
/**
* Describes a routing context from which other `IFluidHandleContext`s are defined.
*/
export declare interface IFluidHandleContext extends IProvideFluidHandleContext {
/**
* The absolute path to the handle context from the root.
*/
readonly absolutePath: string;
/**
* The parent IFluidHandleContext that has provided a route path to this IFluidHandleContext or undefined
* at the root.
*/
readonly routeContext?: IFluidHandleContext;
/**
* Flag indicating whether or not the entity has services attached.
*/
readonly isAttached: boolean;
/**
* Runs through the graph and attach the bounded handles.
*/
attachGraph(): void;
resolveHandle(request: IRequest): Promise<IResponse>;
}
/* Excluded from this release type: IFluidRouter */
export declare const IFluidLoadable: keyof IProvideFluidLoadable;
/* Excluded from this release type: IFluidRunnable */
/**
* A shared FluidObject has a URL from which it can be referenced
*/
export declare interface IFluidLoadable extends IProvideFluidLoadable {
handle: IFluidHandle;
}
/* Excluded from this release type: IGenericError */
/**
* Fluid-specific properties expected on a package to be loaded by the code loader.
* While compatible with the npm package format it is not necessary that that package is an
* npm package:
* {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}
*
* @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackage}
* to have code loading modules in same package.
*/
export declare interface IFluidPackage {
/**
* The name of the package that this code represnets
*/
name: string;
/**
* This object represents the Fluid specific properties of the package
*/
fluid: {
/**
* The name of the of the environment. This should be something like browser, or node
* and contain the necessary targets for loading this code in that environment.
*/
[environment: string]: undefined | IFluidPackageEnvironment;
};
/**
* General access for extended fields as specific usages will
* likely have additional infornamation like a definition of
* compatible versions, or deployment information like rings or rollouts.
*/
[key: string]: unknown;
}
/* Excluded from this release type: ILoggingError */
/**
* Specifies an environment on Fluid property of an {@link IFluidPackage}.
*
* @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackageEnvironment}
* to have code loading modules in same package.
*/
export declare interface IFluidPackageEnvironment {
/**
* The name of the target. For a browser environment, this could be umd for scripts
* or css for styles.
*/
[target: string]: undefined | {
/**
* List of files for the target. These can be relative or absolute.
* The code loader should resolve relative paths, and validate all
* full urls.
*/
files: string[];
/**
* General access for extended fields as specific usages will
* likely have additional infornamation like a definition
* of Library, the entrypoint for umd packages
*/
[key: string]: unknown;
};
}
/* Excluded from this release type: IProvideFluidCodeDetailsComparer */
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare const IFluidRouter: keyof IProvideFluidRouter;
/* Excluded from this release type: IProvideFluidHandle */
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare interface IFluidRouter extends IProvideFluidRouter {
request(request: IRequest): Promise<IResponse>;
}
/* Excluded from this release type: IProvideFluidHandleContext */
export declare const IFluidRunnable: keyof IProvideFluidRunnable;
/* Excluded from this release type: IProvideFluidLoadable */
export declare interface IFluidRunnable {
run(...args: any[]): Promise<void>;
stop(reason?: string): void;
}
/* Excluded from this release type: IProvideFluidRouter */
/**
* Generic wrapper for an unrecognized/uncategorized error object
*/
export declare interface IGenericError extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.genericError;
error?: any;
}
/* Excluded from this release type: IProvideFluidRunnable */
/**
* An error object that supports exporting its properties to be logged to telemetry
*/
export declare interface ILoggingError extends Error {
/**
* Return all properties from this object that should be logged to telemetry
*/
getTelemetryProperties(): ITelemetryBaseProperties;
}
/* Excluded from this release type: IRequest */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#IProvideFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare interface IProvideFluidCodeDetailsComparer {
readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
}
/* Excluded from this release type: IRequestHeader */
export declare interface IProvideFluidHandle {
readonly IFluidHandle: IFluidHandle;
}
/* Excluded from this release type: IResponse */
export declare interface IProvideFluidHandleContext {
readonly IFluidHandleContext: IFluidHandleContext;
}
/* Excluded from this release type: isFluidCodeDetails */
export declare interface IProvideFluidLoadable {
readonly IFluidLoadable: IFluidLoadable;
}
/* Excluded from this release type: isFluidPackage */
/**
* Request routing
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare interface IProvideFluidRouter {
readonly IFluidRouter: IFluidRouter;
}
/* Excluded from this release type: ITaggedTelemetryPropertyType */
export declare interface IProvideFluidRunnable {
readonly IFluidRunnable: IFluidRunnable;
}
/* Excluded from this release type: ITelemetryBaseEvent */
export declare interface IRequest {
url: string;
headers?: IRequestHeader;
}
/* Excluded from this release type: ITelemetryBaseLogger */
export declare interface IRequestHeader {
[index: string]: any;
}
/* Excluded from this release type: ITelemetryBaseProperties */
export declare interface IResponse {
mimeType: string;
status: number;
value: any;
headers?: {
[key: string]: any;
};
stack?: string;
}
/* Excluded from this release type: ITelemetryErrorEvent */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#isFluidCodeDetails}
* to have code loading modules in same package.
*/
export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
/* Excluded from this release type: ITelemetryGenericEvent */
/**
* Check if the package.json defines a Fluid package.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#isFluidPackage}
* to have code loading modules in same package.
*
* @param pkg - The package json data to check if it is a Fluid package.
*/
export declare const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;
/* Excluded from this release type: ITelemetryLogger */
/**
* @see {@link Tagged} for info on tagging
*
* @deprecated Use Tagged\<TelemetryBaseEventPropertyType\>
*/
export declare interface ITaggedTelemetryPropertyType {
value: TelemetryEventPropertyType;
tag: string;
}
/* Excluded from this release type: ITelemetryPerformanceEvent */
/**
* Base interface for logging telemetry statements.
* Can contain any number of properties that get serialized as json payload.
* @param category - category of the event, like "error", "performance", "generic", etc.
* @param eventName - name of the event.
*/
export declare interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
category: string;
eventName: string;
}
/* Excluded from this release type: ITelemetryProperties */
/**
* Interface to output telemetry events.
* Implemented by hosting app / loader
*/
export declare interface ITelemetryBaseLogger {
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
minLogLevel?: LogLevel;
}
/* Excluded from this release type: IThrottlingWarning */
/**
* JSON-serializable properties, which will be logged with telemetry.
*/
export declare type ITelemetryBaseProperties = ITelemetryProperties;
/* Excluded from this release type: IUsageError */
/**
* Error telemetry event.
* Maps to category = "error"
*
* @deprecated For internal use within FluidFramework, use ITelemetryErrorEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryErrorEvent extends ITelemetryProperties {
eventName: string;
}
/* Excluded from this release type: LogLevel */
/**
* Informational (non-error) telemetry event
* Maps to category = "generic"
*
* @deprecated For internal use within FluidFramework, use ITelemetryGenericEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryGenericEvent extends ITelemetryProperties {
eventName: string;
category?: TelemetryEventCategory;
}
/* Excluded from this release type: ReplaceIEventThisPlaceHolder */
/**
* ITelemetryLogger interface contains various helper telemetry methods,
* encoding in one place schemas for various types of Fluid telemetry events.
* Creates sub-logger that appends properties to all events
*
* @deprecated For internal use within FluidFramework, use ITelemetryLoggerExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryLogger extends ITelemetryBaseLogger {
/**
* Actual implementation that sends telemetry event
* Implemented by derived classes
* @param event - Telemetry event to send over
* @param logLevel - optional level of the log.
*/
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
/**
* Send information telemetry event
* @param event - Event to send
* @param error - optional error object to log
* @param logLevel - optional level of the log.
*/
sendTelemetryEvent(event: ITelemetryGenericEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
/**
* Send error telemetry event
* @param event - Event to send
* @param error - optional error object to log
*/
sendErrorEvent(event: ITelemetryErrorEvent, error?: any): void;
/**
* Send performance telemetry event
* @param event - Event to send
* @param error - optional error object to log
* @param logLevel - optional level of the log.
*/
sendPerformanceEvent(event: ITelemetryPerformanceEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
}
/* Excluded from this release type: Tagged */
/**
* Performance telemetry event.
* Maps to category = "performance"
*
* @deprecated For internal use within FluidFramework, use ITelemetryPerformanceEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {
duration?: number;
}
/* Excluded from this release type: TelemetryBaseEventPropertyType */
/**
* {@inheritDoc ITelemetryBaseProperties}
*
* @deprecated Renamed to {@link ITelemetryBaseProperties}
*/
export declare interface ITelemetryProperties {
[index: string]: TelemetryEventPropertyType | Tagged<TelemetryEventPropertyType>;
}
/* Excluded from this release type: TelemetryEventCategory */
/**
* Warning emitted when requests to storage are being throttled
*/
export declare interface IThrottlingWarning extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.throttlingError;
readonly retryAfterSeconds: number;
}
/* Excluded from this release type: TelemetryEventPropertyType */
/**
* Error indicating an API is being used improperly resulting in an invalid operation.
*/
export declare interface IUsageError extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.usageError;
}
/* Excluded from this release type: TransformedEvent */
/**
* Specify levels of the logs.
*/
export declare const LogLevel: {
readonly verbose: 10;
readonly default: 20;
readonly error: 30;
};
/**
* Specify a level to the log to filter out logs based on the level.
*/
export declare type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
/**
* Does the type replacement by changing types of {@link IEventThisPlaceHolder} to `TThis`
*/
export declare type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {
[K in keyof L]: L[K] extends IEventThisPlaceHolder ? TThis : L[K];
} : L;
/**
* A property to be logged to telemetry may require a tag indicating the value may contain sensitive data.
* This type wraps a value of the given type V in an object along with a string tag (type can be further specified as T).
*
* This indicates that the value should be organized or handled differently by loggers in various first or third
* party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.
*/
export declare interface Tagged<V, T extends string = string> {
value: V;
tag: T;
}
/**
* Property types that can be logged.
*
* @remarks Logging entire objects is considered extremely dangerous from a telemetry point of view because people can
* easily add fields to objects that shouldn't be logged and not realize it's going to be logged.
* General best practice is to explicitly log the fields you care about from objects.
*/
export declare type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;
/**
* Examples of known categories, however category can be any string for extensibility.
*
* @deprecated Moved to \@fluidframework/telemetry-utils package
*/
export declare type TelemetryEventCategory = "generic" | "error" | "performance";
/**
* {@inheritDoc TelemetryBaseEventPropertyType}
*
* @deprecated Renamed to {@link TelemetryBaseEventPropertyType}
*/
export declare type TelemetryEventPropertyType = string | number | boolean | undefined;
/**
* Transforms the event overload by replacing {@link IEventThisPlaceHolder} with `TThis` in the event listener
* arguments and having the overload return `TTHis` as well
*/
export declare type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
export { }

@@ -1,907 +0,107 @@

/**
* Allows an interface to extend interfaces that already extend an {@link IEventProvider}.
*
* @example
*
* ``` typescript
* interface AEvents extends IEvent{
* (event: "a-event",listener: (a: number)=>void);
* }
* interface A extends IEventProvider<AEvents>{
* a: object;
* }
*
* interface BEvents extends IEvent{
* (event: "b-event",listener: (b: string)=>void);
* }
* interface B extends ExtendEventProvider<AEvents, A, BEvents>{
* b: boolean;
* };
* ```
*
* interface B will now extend interface A and its events
*
*/
export declare type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;
/* Excluded from this release type: ExtendEventProvider */
/**
* Error types the Fluid Framework may report.
*/
export declare const FluidErrorTypes: {
/**
* Some error, most likely an exception caught by runtime and propagated to container as critical error
*/
readonly genericError: "genericError";
/**
* Throttling error from server. Server is busy and is asking not to reconnect for some time
*/
readonly throttlingError: "throttlingError";
/**
* Data loss error detected by Container / DeltaManager. Likely points to storage issue.
*/
readonly dataCorruptionError: "dataCorruptionError";
/**
* Error encountered when processing an operation. May correlate with data corruption.
*/
readonly dataProcessingError: "dataProcessingError";
/**
* Error indicating an API is being used improperly resulting in an invalid operation.
*/
readonly usageError: "usageError";
};
/* Excluded from this release type: FluidErrorTypes */
export declare type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];
/* Excluded from this release type: FluidObject */
/**
* This utility type take interface(s) that follow the FluidObject pattern, and produces
* a new type that can be used for inspection and discovery of those interfaces.
*
* It is meant to be used with types that are known to implement the FluidObject pattern.
* A common way to specify a type implements the FluidObject pattern is to expose it as a
* FluidObject without a generic argument.
*
* @example
*
* For example, if we have an interface like the following:
*
* ```typescript
* interface IProvideFoo{
* IFoo: IFoo
* }
* interface IFoo extends IProvideFoo{
* foobar();
* }
* ```
*
* and a function that returns a FluidObject. You would do the following
*
* `const maybeFoo: FluidObject<IFoo> = getFluidObject()`;
*
* Either IFoo or IProvideFoo are valid generic arguments. In both case
* maybeFoo will be of type `{IFoo?: IFoo}`. If IFoo is not undefined,
* then the FluidObject provides IFoo, and it can be used.
*
* You can inspect multiple types via a intersection. For example:
* `FluidObject<IFoo & IBar>`
*
*/
export declare type FluidObject<T = unknown> = {
[P in FluidObjectProviderKeys<T>]?: T[P];
};
/* Excluded from this release type: FluidObjectKeys */
/**
* This utility type creates a type that is the union of all keys on the generic type
* which implement the FluidObject pattern.
*
* See {@link FluidObject}
*
* For example `FluidObjectKeys<IFoo & IBar>` would result in `"IFoo" | "IBar"`
*
*/
export declare type FluidObjectKeys<T> = keyof FluidObject<T>;
/* Excluded from this release type: FluidObjectProviderKeys */
/**
* Produces a valid FluidObject key given a type and a property.
*
* @remarks
*
* A valid FluidObject key is a property that exists on the incoming type
* as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`
* This aligns with the FluidObject pattern expected to be used with all FluidObjects.
*
* This utility type is meant for internal use by {@link FluidObject}
*
* @example
*
* ```typescript
* interface IProvideFoo{
* IFoo: IFoo
* }
* interface IFoo extends IProvideFoo{
* foobar();
* }
* ```
*
* This pattern enables discovery, and delegation in a standard way which is central
* to FluidObject pattern.
*/
export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
/* Excluded from this release type: IDisposable */
/**
* Base interface for objects that require lifetime management via explicit disposal.
*/
export declare interface IDisposable {
/**
* Whether or not the object has been disposed.
* If true, the object should be considered invalid, and its other state should be disregarded.
*/
readonly disposed: boolean;
/**
* Dispose of the object and its resources.
* @param error - Optional error indicating the reason for the disposal, if the object was
* disposed as the result of an error.
*/
dispose(error?: Error): void;
}
/* Excluded from this release type: IErrorBase */
/**
* Base interface for all errors and warnings emitted the container.
*
* @remarks
*
* We are in the process of unifying error types across layers of the Framework. For now we have only migrated
* those from container-definitions. Once fully migrated, this will be a base interface for all errors and
* warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.
* Runtime and others will follow soon.
*/
export declare interface IErrorBase extends Partial<Error> {
/**
* A type tag differentiating kinds of errors emitted by the container.
*
* @see See {@link FluidErrorTypes#genericError} for some common examples.
* - container
* - runtime
* - drivers
*/
readonly errorType: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}
*
* @remarks
*
* Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)
* If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result
* of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.
*/
readonly message: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}
*/
readonly name?: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}
*/
readonly stack?: string;
/**
* Returns all properties of this error object that are fit for logging.
* Some may be tagged to indicate they contain some kind of sensitive data.
*/
getTelemetryProperties?(): ITelemetryBaseProperties;
}
/* Excluded from this release type: IErrorEvent */
/**
* Base interface for error event emitters.
*/
export declare interface IErrorEvent extends IEvent {
/**
* Base error event emitter signature.
*
* @eventProperty
*/
(event: "error", listener: (message: any) => void): any;
}
/* Excluded from this release type: IEvent */
/**
* Base interface for event emitters.
*/
export declare interface IEvent {
/**
* Base event emitter signature.
*
* @remarks The event emitter polyfill and the node event emitter have different event types:
* `string | symbol` vs. `string | number`.
*
* So for our typing we'll contrain to string, that way we work with both.
*
* @eventProperty
*/
(event: string, listener: (...args: any[]) => void): any;
}
/* Excluded from this release type: IEventProvider */
/**
* Base interface for event providers.
*/
export declare interface IEventProvider<TEvent extends IEvent> {
/**
* Registers a callback to be invoked when the corresponding event is triggered.
*/
readonly on: IEventTransformer<this, TEvent>;
/**
* Registers a callback to be invoked the first time (after registration) the corresponding event is triggered.
*/
readonly once: IEventTransformer<this, TEvent>;
/**
* Removes the corresponding event if it has been registered.
*/
readonly off: IEventTransformer<this, TEvent>;
}
/* Excluded from this release type: IEventThisPlaceHolder */
/**
* The placeholder type that should be used instead of `this` in events.
*/
export declare type IEventThisPlaceHolder = {
thisPlaceHolder: "thisPlaceHolder";
};
/* Excluded from this release type: IEventTransformer */
/**
* This type is a conditional type for transforming all the overloads provided in `TEvent`.
*
* @remarks
* Due to limitations of the TypeScript typing system, we need to handle each number of overload individually.
* It currently supports the max of 15 event overloads which is more than we use anywhere.
* At more than 15 overloads we start to hit {@link https://github.com/microsoft/TypeScript/issues/37209 | TS2589}.
* If we need to move beyond 15 we should evaluate using a mapped type pattern like `{"event":(listenerArgs)=>void}`
*/
export declare type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: infer E13, listener: (...args: infer A13) => void): any;
(event: infer E14, listener: (...args: infer A14) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> & TransformedEvent<TThis, E13, A13> & TransformedEvent<TThis, E14, A14> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: infer E13, listener: (...args: infer A13) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> & TransformedEvent<TThis, E13, A13> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> : TransformedEvent<TThis, string, any[]>;
/* Excluded from this release type: IFluidCodeDetails */
/**
* Data structure used to describe the code to load on the Fluid document.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetails}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetails {
/**
* The code package to be used on the Fluid document. This is either the package name which will be loaded
* from a package manager. Or the expanded Fluid package.
*/
readonly package: string | Readonly<IFluidPackage>;
/**
* Configuration details. This includes links to the package manager and base CDNs.
*/
readonly config?: IFluidCodeDetailsConfig;
}
/* Excluded from this release type: IFluidCodeDetailsComparer */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
/* Excluded from this release type: IFluidCodeDetailsConfig */
/**
* Provides capability to compare Fluid code details.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
/**
* Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.
*
* Similar semantics to:
* {@link https://github.com/npm/node-semver#usage}
*/
satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
/**
* Returns a number representing the ascending sort order of the `a` and `b` code details:
*
* - `< 0` if `a < b`.
*
* - `= 0` if `a === b`.
*
* - `> 0` if `a > b`.
*
* - `undefined` if `a` is not comparable to `b`.
*
* Similar semantics to:
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description | Array.sort}
*/
compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
}
/* Excluded from this release type: IFluidHandle */
/**
* Package manager configuration. Provides a key value mapping of config values.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsConfig}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetailsConfig {
readonly [key: string]: string;
}
/* Excluded from this release type: IFluidHandleContext */
export declare const IFluidHandle: keyof IProvideFluidHandle;
/* Excluded from this release type: IFluidLoadable */
/**
* Handle to a shared {@link FluidObject}.
*/
export declare interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvideFluidHandle {
/**
* @deprecated Do not use handle's path for routing. Use `get` to get the underlying object.
*
* The absolute path to the handle context from the root.
*/
readonly absolutePath: string;
/**
* Flag indicating whether or not the entity has services attached.
*/
readonly isAttached: boolean;
/**
* @deprecated To be removed. This is part of an internal API surface and should not be called.
*
* Runs through the graph and attach the bounded handles.
*/
attachGraph(): void;
/**
* Returns a promise to the Fluid Object referenced by the handle.
*/
get(): Promise<T>;
/**
* @deprecated To be removed. This is part of an internal API surface and should not be called.
*
* Binds the given handle to this one or attach the given handle if this handle is attached.
* A bound handle will also be attached once this handle is attached.
*/
bind(handle: IFluidHandle): void;
}
/* Excluded from this release type: IFluidPackage */
export declare const IFluidHandleContext: keyof IProvideFluidHandleContext;
/* Excluded from this release type: IFluidPackageEnvironment */
/**
* Describes a routing context from which other `IFluidHandleContext`s are defined.
*/
export declare interface IFluidHandleContext extends IProvideFluidHandleContext {
/**
* The absolute path to the handle context from the root.
*/
readonly absolutePath: string;
/**
* The parent IFluidHandleContext that has provided a route path to this IFluidHandleContext or undefined
* at the root.
*/
readonly routeContext?: IFluidHandleContext;
/**
* Flag indicating whether or not the entity has services attached.
*/
readonly isAttached: boolean;
/**
* Runs through the graph and attach the bounded handles.
*/
attachGraph(): void;
resolveHandle(request: IRequest): Promise<IResponse>;
}
/* Excluded from this release type: IFluidRouter */
export declare const IFluidLoadable: keyof IProvideFluidLoadable;
/* Excluded from this release type: IFluidRunnable */
/**
* A shared FluidObject has a URL from which it can be referenced
*/
export declare interface IFluidLoadable extends IProvideFluidLoadable {
handle: IFluidHandle;
}
/* Excluded from this release type: IGenericError */
/**
* Fluid-specific properties expected on a package to be loaded by the code loader.
* While compatible with the npm package format it is not necessary that that package is an
* npm package:
* {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}
*
* @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackage}
* to have code loading modules in same package.
*/
export declare interface IFluidPackage {
/**
* The name of the package that this code represnets
*/
name: string;
/**
* This object represents the Fluid specific properties of the package
*/
fluid: {
/**
* The name of the of the environment. This should be something like browser, or node
* and contain the necessary targets for loading this code in that environment.
*/
[environment: string]: undefined | IFluidPackageEnvironment;
};
/**
* General access for extended fields as specific usages will
* likely have additional infornamation like a definition of
* compatible versions, or deployment information like rings or rollouts.
*/
[key: string]: unknown;
}
/* Excluded from this release type: ILoggingError */
/**
* Specifies an environment on Fluid property of an {@link IFluidPackage}.
*
* @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackageEnvironment}
* to have code loading modules in same package.
*/
export declare interface IFluidPackageEnvironment {
/**
* The name of the target. For a browser environment, this could be umd for scripts
* or css for styles.
*/
[target: string]: undefined | {
/**
* List of files for the target. These can be relative or absolute.
* The code loader should resolve relative paths, and validate all
* full urls.
*/
files: string[];
/**
* General access for extended fields as specific usages will
* likely have additional infornamation like a definition
* of Library, the entrypoint for umd packages
*/
[key: string]: unknown;
};
}
/* Excluded from this release type: IProvideFluidCodeDetailsComparer */
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare const IFluidRouter: keyof IProvideFluidRouter;
/* Excluded from this release type: IProvideFluidHandle */
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare interface IFluidRouter extends IProvideFluidRouter {
request(request: IRequest): Promise<IResponse>;
}
/* Excluded from this release type: IProvideFluidHandleContext */
export declare const IFluidRunnable: keyof IProvideFluidRunnable;
/* Excluded from this release type: IProvideFluidLoadable */
export declare interface IFluidRunnable {
run(...args: any[]): Promise<void>;
stop(reason?: string): void;
}
/* Excluded from this release type: IProvideFluidRouter */
/**
* Generic wrapper for an unrecognized/uncategorized error object
*/
export declare interface IGenericError extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.genericError;
error?: any;
}
/* Excluded from this release type: IProvideFluidRunnable */
/**
* An error object that supports exporting its properties to be logged to telemetry
*/
export declare interface ILoggingError extends Error {
/**
* Return all properties from this object that should be logged to telemetry
*/
getTelemetryProperties(): ITelemetryBaseProperties;
}
/* Excluded from this release type: IRequest */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#IProvideFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare interface IProvideFluidCodeDetailsComparer {
readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
}
/* Excluded from this release type: IRequestHeader */
export declare interface IProvideFluidHandle {
readonly IFluidHandle: IFluidHandle;
}
/* Excluded from this release type: IResponse */
export declare interface IProvideFluidHandleContext {
readonly IFluidHandleContext: IFluidHandleContext;
}
/* Excluded from this release type: isFluidCodeDetails */
export declare interface IProvideFluidLoadable {
readonly IFluidLoadable: IFluidLoadable;
}
/* Excluded from this release type: isFluidPackage */
/**
* Request routing
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare interface IProvideFluidRouter {
readonly IFluidRouter: IFluidRouter;
}
/* Excluded from this release type: ITaggedTelemetryPropertyType */
export declare interface IProvideFluidRunnable {
readonly IFluidRunnable: IFluidRunnable;
}
/* Excluded from this release type: ITelemetryBaseEvent */
export declare interface IRequest {
url: string;
headers?: IRequestHeader;
}
/* Excluded from this release type: ITelemetryBaseLogger */
export declare interface IRequestHeader {
[index: string]: any;
}
/* Excluded from this release type: ITelemetryBaseProperties */
export declare interface IResponse {
mimeType: string;
status: number;
value: any;
headers?: {
[key: string]: any;
};
stack?: string;
}
/* Excluded from this release type: ITelemetryErrorEvent */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#isFluidCodeDetails}
* to have code loading modules in same package.
*/
export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
/* Excluded from this release type: ITelemetryGenericEvent */
/**
* Check if the package.json defines a Fluid package.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#isFluidPackage}
* to have code loading modules in same package.
*
* @param pkg - The package json data to check if it is a Fluid package.
*/
export declare const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;
/* Excluded from this release type: ITelemetryLogger */
/**
* @see {@link Tagged} for info on tagging
*
* @deprecated Use Tagged\<TelemetryBaseEventPropertyType\>
*/
export declare interface ITaggedTelemetryPropertyType {
value: TelemetryEventPropertyType;
tag: string;
}
/* Excluded from this release type: ITelemetryPerformanceEvent */
/**
* Base interface for logging telemetry statements.
* Can contain any number of properties that get serialized as json payload.
* @param category - category of the event, like "error", "performance", "generic", etc.
* @param eventName - name of the event.
*/
export declare interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
category: string;
eventName: string;
}
/* Excluded from this release type: ITelemetryProperties */
/**
* Interface to output telemetry events.
* Implemented by hosting app / loader
*/
export declare interface ITelemetryBaseLogger {
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
minLogLevel?: LogLevel;
}
/* Excluded from this release type: IThrottlingWarning */
/**
* JSON-serializable properties, which will be logged with telemetry.
*/
export declare type ITelemetryBaseProperties = ITelemetryProperties;
/* Excluded from this release type: IUsageError */
/**
* Error telemetry event.
* Maps to category = "error"
*
* @deprecated For internal use within FluidFramework, use ITelemetryErrorEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryErrorEvent extends ITelemetryProperties {
eventName: string;
}
/* Excluded from this release type: LogLevel */
/**
* Informational (non-error) telemetry event
* Maps to category = "generic"
*
* @deprecated For internal use within FluidFramework, use ITelemetryGenericEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryGenericEvent extends ITelemetryProperties {
eventName: string;
category?: TelemetryEventCategory;
}
/* Excluded from this release type: ReplaceIEventThisPlaceHolder */
/**
* ITelemetryLogger interface contains various helper telemetry methods,
* encoding in one place schemas for various types of Fluid telemetry events.
* Creates sub-logger that appends properties to all events
*
* @deprecated For internal use within FluidFramework, use ITelemetryLoggerExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryLogger extends ITelemetryBaseLogger {
/**
* Actual implementation that sends telemetry event
* Implemented by derived classes
* @param event - Telemetry event to send over
* @param logLevel - optional level of the log.
*/
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
/**
* Send information telemetry event
* @param event - Event to send
* @param error - optional error object to log
* @param logLevel - optional level of the log.
*/
sendTelemetryEvent(event: ITelemetryGenericEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
/**
* Send error telemetry event
* @param event - Event to send
* @param error - optional error object to log
*/
sendErrorEvent(event: ITelemetryErrorEvent, error?: any): void;
/**
* Send performance telemetry event
* @param event - Event to send
* @param error - optional error object to log
* @param logLevel - optional level of the log.
*/
sendPerformanceEvent(event: ITelemetryPerformanceEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
}
/* Excluded from this release type: Tagged */
/**
* Performance telemetry event.
* Maps to category = "performance"
*
* @deprecated For internal use within FluidFramework, use ITelemetryPerformanceEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {
duration?: number;
}
/* Excluded from this release type: TelemetryBaseEventPropertyType */
/**
* {@inheritDoc ITelemetryBaseProperties}
*
* @deprecated Renamed to {@link ITelemetryBaseProperties}
*/
export declare interface ITelemetryProperties {
[index: string]: TelemetryEventPropertyType | Tagged<TelemetryEventPropertyType>;
}
/* Excluded from this release type: TelemetryEventCategory */
/**
* Warning emitted when requests to storage are being throttled
*/
export declare interface IThrottlingWarning extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.throttlingError;
readonly retryAfterSeconds: number;
}
/* Excluded from this release type: TelemetryEventPropertyType */
/**
* Error indicating an API is being used improperly resulting in an invalid operation.
*/
export declare interface IUsageError extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.usageError;
}
/* Excluded from this release type: TransformedEvent */
/**
* Specify levels of the logs.
*/
export declare const LogLevel: {
readonly verbose: 10;
readonly default: 20;
readonly error: 30;
};
/**
* Specify a level to the log to filter out logs based on the level.
*/
export declare type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
/**
* Does the type replacement by changing types of {@link IEventThisPlaceHolder} to `TThis`
*/
export declare type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {
[K in keyof L]: L[K] extends IEventThisPlaceHolder ? TThis : L[K];
} : L;
/**
* A property to be logged to telemetry may require a tag indicating the value may contain sensitive data.
* This type wraps a value of the given type V in an object along with a string tag (type can be further specified as T).
*
* This indicates that the value should be organized or handled differently by loggers in various first or third
* party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.
*/
export declare interface Tagged<V, T extends string = string> {
value: V;
tag: T;
}
/**
* Property types that can be logged.
*
* @remarks Logging entire objects is considered extremely dangerous from a telemetry point of view because people can
* easily add fields to objects that shouldn't be logged and not realize it's going to be logged.
* General best practice is to explicitly log the fields you care about from objects.
*/
export declare type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;
/**
* Examples of known categories, however category can be any string for extensibility.
*
* @deprecated Moved to \@fluidframework/telemetry-utils package
*/
export declare type TelemetryEventCategory = "generic" | "error" | "performance";
/**
* {@inheritDoc TelemetryBaseEventPropertyType}
*
* @deprecated Renamed to {@link TelemetryBaseEventPropertyType}
*/
export declare type TelemetryEventPropertyType = string | number | boolean | undefined;
/**
* Transforms the event overload by replacing {@link IEventThisPlaceHolder} with `TThis` in the event listener
* arguments and having the overload return `TTHis` as well
*/
export declare type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
export { }

@@ -1,907 +0,107 @@

/**
* Allows an interface to extend interfaces that already extend an {@link IEventProvider}.
*
* @example
*
* ``` typescript
* interface AEvents extends IEvent{
* (event: "a-event",listener: (a: number)=>void);
* }
* interface A extends IEventProvider<AEvents>{
* a: object;
* }
*
* interface BEvents extends IEvent{
* (event: "b-event",listener: (b: string)=>void);
* }
* interface B extends ExtendEventProvider<AEvents, A, BEvents>{
* b: boolean;
* };
* ```
*
* interface B will now extend interface A and its events
*
*/
export declare type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;
/* Excluded from this release type: ExtendEventProvider */
/**
* Error types the Fluid Framework may report.
*/
export declare const FluidErrorTypes: {
/**
* Some error, most likely an exception caught by runtime and propagated to container as critical error
*/
readonly genericError: "genericError";
/**
* Throttling error from server. Server is busy and is asking not to reconnect for some time
*/
readonly throttlingError: "throttlingError";
/**
* Data loss error detected by Container / DeltaManager. Likely points to storage issue.
*/
readonly dataCorruptionError: "dataCorruptionError";
/**
* Error encountered when processing an operation. May correlate with data corruption.
*/
readonly dataProcessingError: "dataProcessingError";
/**
* Error indicating an API is being used improperly resulting in an invalid operation.
*/
readonly usageError: "usageError";
};
/* Excluded from this release type: FluidErrorTypes */
export declare type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];
/* Excluded from this release type: FluidObject */
/**
* This utility type take interface(s) that follow the FluidObject pattern, and produces
* a new type that can be used for inspection and discovery of those interfaces.
*
* It is meant to be used with types that are known to implement the FluidObject pattern.
* A common way to specify a type implements the FluidObject pattern is to expose it as a
* FluidObject without a generic argument.
*
* @example
*
* For example, if we have an interface like the following:
*
* ```typescript
* interface IProvideFoo{
* IFoo: IFoo
* }
* interface IFoo extends IProvideFoo{
* foobar();
* }
* ```
*
* and a function that returns a FluidObject. You would do the following
*
* `const maybeFoo: FluidObject<IFoo> = getFluidObject()`;
*
* Either IFoo or IProvideFoo are valid generic arguments. In both case
* maybeFoo will be of type `{IFoo?: IFoo}`. If IFoo is not undefined,
* then the FluidObject provides IFoo, and it can be used.
*
* You can inspect multiple types via a intersection. For example:
* `FluidObject<IFoo & IBar>`
*
*/
export declare type FluidObject<T = unknown> = {
[P in FluidObjectProviderKeys<T>]?: T[P];
};
/* Excluded from this release type: FluidObjectKeys */
/**
* This utility type creates a type that is the union of all keys on the generic type
* which implement the FluidObject pattern.
*
* See {@link FluidObject}
*
* For example `FluidObjectKeys<IFoo & IBar>` would result in `"IFoo" | "IBar"`
*
*/
export declare type FluidObjectKeys<T> = keyof FluidObject<T>;
/* Excluded from this release type: FluidObjectProviderKeys */
/**
* Produces a valid FluidObject key given a type and a property.
*
* @remarks
*
* A valid FluidObject key is a property that exists on the incoming type
* as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`
* This aligns with the FluidObject pattern expected to be used with all FluidObjects.
*
* This utility type is meant for internal use by {@link FluidObject}
*
* @example
*
* ```typescript
* interface IProvideFoo{
* IFoo: IFoo
* }
* interface IFoo extends IProvideFoo{
* foobar();
* }
* ```
*
* This pattern enables discovery, and delegation in a standard way which is central
* to FluidObject pattern.
*/
export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
/* Excluded from this release type: IDisposable */
/**
* Base interface for objects that require lifetime management via explicit disposal.
*/
export declare interface IDisposable {
/**
* Whether or not the object has been disposed.
* If true, the object should be considered invalid, and its other state should be disregarded.
*/
readonly disposed: boolean;
/**
* Dispose of the object and its resources.
* @param error - Optional error indicating the reason for the disposal, if the object was
* disposed as the result of an error.
*/
dispose(error?: Error): void;
}
/* Excluded from this release type: IErrorBase */
/**
* Base interface for all errors and warnings emitted the container.
*
* @remarks
*
* We are in the process of unifying error types across layers of the Framework. For now we have only migrated
* those from container-definitions. Once fully migrated, this will be a base interface for all errors and
* warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.
* Runtime and others will follow soon.
*/
export declare interface IErrorBase extends Partial<Error> {
/**
* A type tag differentiating kinds of errors emitted by the container.
*
* @see See {@link FluidErrorTypes#genericError} for some common examples.
* - container
* - runtime
* - drivers
*/
readonly errorType: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}
*
* @remarks
*
* Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)
* If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result
* of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.
*/
readonly message: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}
*/
readonly name?: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}
*/
readonly stack?: string;
/**
* Returns all properties of this error object that are fit for logging.
* Some may be tagged to indicate they contain some kind of sensitive data.
*/
getTelemetryProperties?(): ITelemetryBaseProperties;
}
/* Excluded from this release type: IErrorEvent */
/**
* Base interface for error event emitters.
*/
export declare interface IErrorEvent extends IEvent {
/**
* Base error event emitter signature.
*
* @eventProperty
*/
(event: "error", listener: (message: any) => void): any;
}
/* Excluded from this release type: IEvent */
/**
* Base interface for event emitters.
*/
export declare interface IEvent {
/**
* Base event emitter signature.
*
* @remarks The event emitter polyfill and the node event emitter have different event types:
* `string | symbol` vs. `string | number`.
*
* So for our typing we'll contrain to string, that way we work with both.
*
* @eventProperty
*/
(event: string, listener: (...args: any[]) => void): any;
}
/* Excluded from this release type: IEventProvider */
/**
* Base interface for event providers.
*/
export declare interface IEventProvider<TEvent extends IEvent> {
/**
* Registers a callback to be invoked when the corresponding event is triggered.
*/
readonly on: IEventTransformer<this, TEvent>;
/**
* Registers a callback to be invoked the first time (after registration) the corresponding event is triggered.
*/
readonly once: IEventTransformer<this, TEvent>;
/**
* Removes the corresponding event if it has been registered.
*/
readonly off: IEventTransformer<this, TEvent>;
}
/* Excluded from this release type: IEventThisPlaceHolder */
/**
* The placeholder type that should be used instead of `this` in events.
*/
export declare type IEventThisPlaceHolder = {
thisPlaceHolder: "thisPlaceHolder";
};
/* Excluded from this release type: IEventTransformer */
/**
* This type is a conditional type for transforming all the overloads provided in `TEvent`.
*
* @remarks
* Due to limitations of the TypeScript typing system, we need to handle each number of overload individually.
* It currently supports the max of 15 event overloads which is more than we use anywhere.
* At more than 15 overloads we start to hit {@link https://github.com/microsoft/TypeScript/issues/37209 | TS2589}.
* If we need to move beyond 15 we should evaluate using a mapped type pattern like `{"event":(listenerArgs)=>void}`
*/
export declare type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: infer E13, listener: (...args: infer A13) => void): any;
(event: infer E14, listener: (...args: infer A14) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> & TransformedEvent<TThis, E13, A13> & TransformedEvent<TThis, E14, A14> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: infer E13, listener: (...args: infer A13) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> & TransformedEvent<TThis, E13, A13> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> : TransformedEvent<TThis, string, any[]>;
/* Excluded from this release type: IFluidCodeDetails */
/**
* Data structure used to describe the code to load on the Fluid document.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetails}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetails {
/**
* The code package to be used on the Fluid document. This is either the package name which will be loaded
* from a package manager. Or the expanded Fluid package.
*/
readonly package: string | Readonly<IFluidPackage>;
/**
* Configuration details. This includes links to the package manager and base CDNs.
*/
readonly config?: IFluidCodeDetailsConfig;
}
/* Excluded from this release type: IFluidCodeDetailsComparer */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
/* Excluded from this release type: IFluidCodeDetailsConfig */
/**
* Provides capability to compare Fluid code details.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
/**
* Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.
*
* Similar semantics to:
* {@link https://github.com/npm/node-semver#usage}
*/
satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
/**
* Returns a number representing the ascending sort order of the `a` and `b` code details:
*
* - `< 0` if `a < b`.
*
* - `= 0` if `a === b`.
*
* - `> 0` if `a > b`.
*
* - `undefined` if `a` is not comparable to `b`.
*
* Similar semantics to:
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description | Array.sort}
*/
compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
}
/* Excluded from this release type: IFluidHandle */
/**
* Package manager configuration. Provides a key value mapping of config values.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsConfig}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetailsConfig {
readonly [key: string]: string;
}
/* Excluded from this release type: IFluidHandleContext */
export declare const IFluidHandle: keyof IProvideFluidHandle;
/* Excluded from this release type: IFluidLoadable */
/**
* Handle to a shared {@link FluidObject}.
*/
export declare interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvideFluidHandle {
/**
* @deprecated Do not use handle's path for routing. Use `get` to get the underlying object.
*
* The absolute path to the handle context from the root.
*/
readonly absolutePath: string;
/**
* Flag indicating whether or not the entity has services attached.
*/
readonly isAttached: boolean;
/**
* @deprecated To be removed. This is part of an internal API surface and should not be called.
*
* Runs through the graph and attach the bounded handles.
*/
attachGraph(): void;
/**
* Returns a promise to the Fluid Object referenced by the handle.
*/
get(): Promise<T>;
/**
* @deprecated To be removed. This is part of an internal API surface and should not be called.
*
* Binds the given handle to this one or attach the given handle if this handle is attached.
* A bound handle will also be attached once this handle is attached.
*/
bind(handle: IFluidHandle): void;
}
/* Excluded from this release type: IFluidPackage */
export declare const IFluidHandleContext: keyof IProvideFluidHandleContext;
/* Excluded from this release type: IFluidPackageEnvironment */
/**
* Describes a routing context from which other `IFluidHandleContext`s are defined.
*/
export declare interface IFluidHandleContext extends IProvideFluidHandleContext {
/**
* The absolute path to the handle context from the root.
*/
readonly absolutePath: string;
/**
* The parent IFluidHandleContext that has provided a route path to this IFluidHandleContext or undefined
* at the root.
*/
readonly routeContext?: IFluidHandleContext;
/**
* Flag indicating whether or not the entity has services attached.
*/
readonly isAttached: boolean;
/**
* Runs through the graph and attach the bounded handles.
*/
attachGraph(): void;
resolveHandle(request: IRequest): Promise<IResponse>;
}
/* Excluded from this release type: IFluidRouter */
export declare const IFluidLoadable: keyof IProvideFluidLoadable;
/* Excluded from this release type: IFluidRunnable */
/**
* A shared FluidObject has a URL from which it can be referenced
*/
export declare interface IFluidLoadable extends IProvideFluidLoadable {
handle: IFluidHandle;
}
/* Excluded from this release type: IGenericError */
/**
* Fluid-specific properties expected on a package to be loaded by the code loader.
* While compatible with the npm package format it is not necessary that that package is an
* npm package:
* {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}
*
* @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackage}
* to have code loading modules in same package.
*/
export declare interface IFluidPackage {
/**
* The name of the package that this code represnets
*/
name: string;
/**
* This object represents the Fluid specific properties of the package
*/
fluid: {
/**
* The name of the of the environment. This should be something like browser, or node
* and contain the necessary targets for loading this code in that environment.
*/
[environment: string]: undefined | IFluidPackageEnvironment;
};
/**
* General access for extended fields as specific usages will
* likely have additional infornamation like a definition of
* compatible versions, or deployment information like rings or rollouts.
*/
[key: string]: unknown;
}
/* Excluded from this release type: ILoggingError */
/**
* Specifies an environment on Fluid property of an {@link IFluidPackage}.
*
* @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackageEnvironment}
* to have code loading modules in same package.
*/
export declare interface IFluidPackageEnvironment {
/**
* The name of the target. For a browser environment, this could be umd for scripts
* or css for styles.
*/
[target: string]: undefined | {
/**
* List of files for the target. These can be relative or absolute.
* The code loader should resolve relative paths, and validate all
* full urls.
*/
files: string[];
/**
* General access for extended fields as specific usages will
* likely have additional infornamation like a definition
* of Library, the entrypoint for umd packages
*/
[key: string]: unknown;
};
}
/* Excluded from this release type: IProvideFluidCodeDetailsComparer */
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare const IFluidRouter: keyof IProvideFluidRouter;
/* Excluded from this release type: IProvideFluidHandle */
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare interface IFluidRouter extends IProvideFluidRouter {
request(request: IRequest): Promise<IResponse>;
}
/* Excluded from this release type: IProvideFluidHandleContext */
export declare const IFluidRunnable: keyof IProvideFluidRunnable;
/* Excluded from this release type: IProvideFluidLoadable */
export declare interface IFluidRunnable {
run(...args: any[]): Promise<void>;
stop(reason?: string): void;
}
/* Excluded from this release type: IProvideFluidRouter */
/**
* Generic wrapper for an unrecognized/uncategorized error object
*/
export declare interface IGenericError extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.genericError;
error?: any;
}
/* Excluded from this release type: IProvideFluidRunnable */
/**
* An error object that supports exporting its properties to be logged to telemetry
*/
export declare interface ILoggingError extends Error {
/**
* Return all properties from this object that should be logged to telemetry
*/
getTelemetryProperties(): ITelemetryBaseProperties;
}
/* Excluded from this release type: IRequest */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#IProvideFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare interface IProvideFluidCodeDetailsComparer {
readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
}
/* Excluded from this release type: IRequestHeader */
export declare interface IProvideFluidHandle {
readonly IFluidHandle: IFluidHandle;
}
/* Excluded from this release type: IResponse */
export declare interface IProvideFluidHandleContext {
readonly IFluidHandleContext: IFluidHandleContext;
}
/* Excluded from this release type: isFluidCodeDetails */
export declare interface IProvideFluidLoadable {
readonly IFluidLoadable: IFluidLoadable;
}
/* Excluded from this release type: isFluidPackage */
/**
* Request routing
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare interface IProvideFluidRouter {
readonly IFluidRouter: IFluidRouter;
}
/* Excluded from this release type: ITaggedTelemetryPropertyType */
export declare interface IProvideFluidRunnable {
readonly IFluidRunnable: IFluidRunnable;
}
/* Excluded from this release type: ITelemetryBaseEvent */
export declare interface IRequest {
url: string;
headers?: IRequestHeader;
}
/* Excluded from this release type: ITelemetryBaseLogger */
export declare interface IRequestHeader {
[index: string]: any;
}
/* Excluded from this release type: ITelemetryBaseProperties */
export declare interface IResponse {
mimeType: string;
status: number;
value: any;
headers?: {
[key: string]: any;
};
stack?: string;
}
/* Excluded from this release type: ITelemetryErrorEvent */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#isFluidCodeDetails}
* to have code loading modules in same package.
*/
export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
/* Excluded from this release type: ITelemetryGenericEvent */
/**
* Check if the package.json defines a Fluid package.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#isFluidPackage}
* to have code loading modules in same package.
*
* @param pkg - The package json data to check if it is a Fluid package.
*/
export declare const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;
/* Excluded from this release type: ITelemetryLogger */
/**
* @see {@link Tagged} for info on tagging
*
* @deprecated Use Tagged\<TelemetryBaseEventPropertyType\>
*/
export declare interface ITaggedTelemetryPropertyType {
value: TelemetryEventPropertyType;
tag: string;
}
/* Excluded from this release type: ITelemetryPerformanceEvent */
/**
* Base interface for logging telemetry statements.
* Can contain any number of properties that get serialized as json payload.
* @param category - category of the event, like "error", "performance", "generic", etc.
* @param eventName - name of the event.
*/
export declare interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
category: string;
eventName: string;
}
/* Excluded from this release type: ITelemetryProperties */
/**
* Interface to output telemetry events.
* Implemented by hosting app / loader
*/
export declare interface ITelemetryBaseLogger {
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
minLogLevel?: LogLevel;
}
/* Excluded from this release type: IThrottlingWarning */
/**
* JSON-serializable properties, which will be logged with telemetry.
*/
export declare type ITelemetryBaseProperties = ITelemetryProperties;
/* Excluded from this release type: IUsageError */
/**
* Error telemetry event.
* Maps to category = "error"
*
* @deprecated For internal use within FluidFramework, use ITelemetryErrorEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryErrorEvent extends ITelemetryProperties {
eventName: string;
}
/* Excluded from this release type: LogLevel */
/**
* Informational (non-error) telemetry event
* Maps to category = "generic"
*
* @deprecated For internal use within FluidFramework, use ITelemetryGenericEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryGenericEvent extends ITelemetryProperties {
eventName: string;
category?: TelemetryEventCategory;
}
/* Excluded from this release type: ReplaceIEventThisPlaceHolder */
/**
* ITelemetryLogger interface contains various helper telemetry methods,
* encoding in one place schemas for various types of Fluid telemetry events.
* Creates sub-logger that appends properties to all events
*
* @deprecated For internal use within FluidFramework, use ITelemetryLoggerExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryLogger extends ITelemetryBaseLogger {
/**
* Actual implementation that sends telemetry event
* Implemented by derived classes
* @param event - Telemetry event to send over
* @param logLevel - optional level of the log.
*/
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
/**
* Send information telemetry event
* @param event - Event to send
* @param error - optional error object to log
* @param logLevel - optional level of the log.
*/
sendTelemetryEvent(event: ITelemetryGenericEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
/**
* Send error telemetry event
* @param event - Event to send
* @param error - optional error object to log
*/
sendErrorEvent(event: ITelemetryErrorEvent, error?: any): void;
/**
* Send performance telemetry event
* @param event - Event to send
* @param error - optional error object to log
* @param logLevel - optional level of the log.
*/
sendPerformanceEvent(event: ITelemetryPerformanceEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
}
/* Excluded from this release type: Tagged */
/**
* Performance telemetry event.
* Maps to category = "performance"
*
* @deprecated For internal use within FluidFramework, use ITelemetryPerformanceEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {
duration?: number;
}
/* Excluded from this release type: TelemetryBaseEventPropertyType */
/**
* {@inheritDoc ITelemetryBaseProperties}
*
* @deprecated Renamed to {@link ITelemetryBaseProperties}
*/
export declare interface ITelemetryProperties {
[index: string]: TelemetryEventPropertyType | Tagged<TelemetryEventPropertyType>;
}
/* Excluded from this release type: TelemetryEventCategory */
/**
* Warning emitted when requests to storage are being throttled
*/
export declare interface IThrottlingWarning extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.throttlingError;
readonly retryAfterSeconds: number;
}
/* Excluded from this release type: TelemetryEventPropertyType */
/**
* Error indicating an API is being used improperly resulting in an invalid operation.
*/
export declare interface IUsageError extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.usageError;
}
/* Excluded from this release type: TransformedEvent */
/**
* Specify levels of the logs.
*/
export declare const LogLevel: {
readonly verbose: 10;
readonly default: 20;
readonly error: 30;
};
/**
* Specify a level to the log to filter out logs based on the level.
*/
export declare type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
/**
* Does the type replacement by changing types of {@link IEventThisPlaceHolder} to `TThis`
*/
export declare type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {
[K in keyof L]: L[K] extends IEventThisPlaceHolder ? TThis : L[K];
} : L;
/**
* A property to be logged to telemetry may require a tag indicating the value may contain sensitive data.
* This type wraps a value of the given type V in an object along with a string tag (type can be further specified as T).
*
* This indicates that the value should be organized or handled differently by loggers in various first or third
* party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.
*/
export declare interface Tagged<V, T extends string = string> {
value: V;
tag: T;
}
/**
* Property types that can be logged.
*
* @remarks Logging entire objects is considered extremely dangerous from a telemetry point of view because people can
* easily add fields to objects that shouldn't be logged and not realize it's going to be logged.
* General best practice is to explicitly log the fields you care about from objects.
*/
export declare type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;
/**
* Examples of known categories, however category can be any string for extensibility.
*
* @deprecated Moved to \@fluidframework/telemetry-utils package
*/
export declare type TelemetryEventCategory = "generic" | "error" | "performance";
/**
* {@inheritDoc TelemetryBaseEventPropertyType}
*
* @deprecated Renamed to {@link TelemetryBaseEventPropertyType}
*/
export declare type TelemetryEventPropertyType = string | number | boolean | undefined;
/**
* Transforms the event overload by replacing {@link IEventThisPlaceHolder} with `TThis` in the event listener
* arguments and having the overload return `TTHis` as well
*/
export declare type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
export { }

@@ -23,3 +23,3 @@ /**

* interface B will now extend interface A and its events
*
* @internal
*/

@@ -30,2 +30,3 @@ export declare type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;

* Error types the Fluid Framework may report.
* @internal
*/

@@ -55,2 +56,5 @@ export declare const FluidErrorTypes: {

/**
* @internal
*/
export declare type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];

@@ -89,3 +93,3 @@

* `FluidObject<IFoo & IBar>`
*
* @internal
*/

@@ -103,3 +107,3 @@ export declare type FluidObject<T = unknown> = {

* For example `FluidObjectKeys<IFoo & IBar>` would result in `"IFoo" | "IBar"`
*
* @internal
*/

@@ -132,2 +136,3 @@ export declare type FluidObjectKeys<T> = keyof FluidObject<T>;

* to FluidObject pattern.
* @internal
*/

@@ -138,2 +143,3 @@ export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;

* Base interface for objects that require lifetime management via explicit disposal.
* @internal
*/

@@ -163,2 +169,3 @@ export declare interface IDisposable {

* Runtime and others will follow soon.
* @internal
*/

@@ -202,2 +209,3 @@ export declare interface IErrorBase extends Partial<Error> {

* Base interface for error event emitters.
* @internal
*/

@@ -215,2 +223,3 @@ export declare interface IErrorEvent extends IEvent {

* Base interface for event emitters.
* @internal
*/

@@ -233,2 +242,3 @@ export declare interface IEvent {

* Base interface for event providers.
* @internal
*/

@@ -252,2 +262,3 @@ export declare interface IEventProvider<TEvent extends IEvent> {

* The placeholder type that should be used instead of `this` in events.
* @internal
*/

@@ -266,2 +277,3 @@ export declare type IEventThisPlaceHolder = {

* If we need to move beyond 15 we should evaluate using a mapped type pattern like `{"event":(listenerArgs)=>void}`
* @internal
*/

@@ -425,2 +437,3 @@ export declare type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {

* to have code loading modules in same package.
* @internal
*/

@@ -442,2 +455,3 @@ export declare interface IFluidCodeDetails {

* to have code loading modules in same package.
* @internal
*/

@@ -451,2 +465,3 @@ export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;

* to have code loading modules in same package.
* @internal
*/

@@ -483,2 +498,3 @@ export declare interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {

* to have code loading modules in same package.
* @internal
*/

@@ -489,2 +505,5 @@ export declare interface IFluidCodeDetailsConfig {

/**
* @internal
*/
export declare const IFluidHandle: keyof IProvideFluidHandle;

@@ -494,2 +513,3 @@

* Handle to a shared {@link FluidObject}.
* @internal
*/

@@ -526,2 +546,5 @@ export declare interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvideFluidHandle {

/**
* @internal
*/
export declare const IFluidHandleContext: keyof IProvideFluidHandleContext;

@@ -531,2 +554,3 @@

* Describes a routing context from which other `IFluidHandleContext`s are defined.
* @internal
*/

@@ -554,2 +578,5 @@ export declare interface IFluidHandleContext extends IProvideFluidHandleContext {

/**
* @internal
*/
export declare const IFluidLoadable: keyof IProvideFluidLoadable;

@@ -559,2 +586,3 @@

* A shared FluidObject has a URL from which it can be referenced
* @internal
*/

@@ -573,2 +601,3 @@ export declare interface IFluidLoadable extends IProvideFluidLoadable {

* to have code loading modules in same package.
* @internal
*/

@@ -603,2 +632,3 @@ export declare interface IFluidPackage {

* to have code loading modules in same package.
* @internal
*/

@@ -628,2 +658,3 @@ export declare interface IFluidPackageEnvironment {

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/

@@ -634,2 +665,3 @@ export declare const IFluidRouter: keyof IProvideFluidRouter;

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/

@@ -640,4 +672,10 @@ export declare interface IFluidRouter extends IProvideFluidRouter {

/**
* @internal
*/
export declare const IFluidRunnable: keyof IProvideFluidRunnable;
/**
* @internal
*/
export declare interface IFluidRunnable {

@@ -650,2 +688,3 @@ run(...args: any[]): Promise<void>;

* Generic wrapper for an unrecognized/uncategorized error object
* @internal
*/

@@ -662,2 +701,3 @@ export declare interface IGenericError extends IErrorBase {

* An error object that supports exporting its properties to be logged to telemetry
* @internal
*/

@@ -674,2 +714,3 @@ export declare interface ILoggingError extends Error {

* to have code loading modules in same package.
* @internal
*/

@@ -680,2 +721,5 @@ export declare interface IProvideFluidCodeDetailsComparer {

/**
* @internal
*/
export declare interface IProvideFluidHandle {

@@ -685,2 +729,5 @@ readonly IFluidHandle: IFluidHandle;

/**
* @internal
*/
export declare interface IProvideFluidHandleContext {

@@ -690,2 +737,5 @@ readonly IFluidHandleContext: IFluidHandleContext;

/**
* @internal
*/
export declare interface IProvideFluidLoadable {

@@ -698,2 +748,3 @@ readonly IFluidLoadable: IFluidLoadable;

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/

@@ -704,2 +755,5 @@ export declare interface IProvideFluidRouter {

/**
* @internal
*/
export declare interface IProvideFluidRunnable {

@@ -709,2 +763,5 @@ readonly IFluidRunnable: IFluidRunnable;

/**
* @internal
*/
export declare interface IRequest {

@@ -715,2 +772,5 @@ url: string;

/**
* @internal
*/
export declare interface IRequestHeader {

@@ -720,2 +780,5 @@ [index: string]: any;

/**
* @internal
*/
export declare interface IResponse {

@@ -734,2 +797,3 @@ mimeType: string;

* to have code loading modules in same package.
* @internal
*/

@@ -745,2 +809,3 @@ export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;

* @param pkg - The package json data to check if it is a Fluid package.
* @internal
*/

@@ -753,2 +818,3 @@ export declare const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;

* @deprecated Use Tagged\<TelemetryBaseEventPropertyType\>
* @internal
*/

@@ -765,2 +831,3 @@ export declare interface ITaggedTelemetryPropertyType {

* @param eventName - name of the event.
* @internal
*/

@@ -775,2 +842,3 @@ export declare interface ITelemetryBaseEvent extends ITelemetryBaseProperties {

* Implemented by hosting app / loader
* @internal
*/

@@ -784,2 +852,3 @@ export declare interface ITelemetryBaseLogger {

* JSON-serializable properties, which will be logged with telemetry.
* @internal
*/

@@ -794,2 +863,3 @@ export declare type ITelemetryBaseProperties = ITelemetryProperties;

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -806,2 +876,3 @@ export declare interface ITelemetryErrorEvent extends ITelemetryProperties {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -820,2 +891,3 @@ export declare interface ITelemetryGenericEvent extends ITelemetryProperties {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -858,2 +930,3 @@ export declare interface ITelemetryLogger extends ITelemetryBaseLogger {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -868,2 +941,3 @@ export declare interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {

* @deprecated Renamed to {@link ITelemetryBaseProperties}
* @internal
*/

@@ -876,2 +950,3 @@ export declare interface ITelemetryProperties {

* Warning emitted when requests to storage are being throttled
* @internal
*/

@@ -888,2 +963,3 @@ export declare interface IThrottlingWarning extends IErrorBase {

* Error indicating an API is being used improperly resulting in an invalid operation.
* @internal
*/

@@ -899,2 +975,3 @@ export declare interface IUsageError extends IErrorBase {

* Specify levels of the logs.
* @internal
*/

@@ -909,2 +986,3 @@ export declare const LogLevel: {

* Specify a level to the log to filter out logs based on the level.
* @internal
*/

@@ -915,2 +993,3 @@ export declare type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];

* Does the type replacement by changing types of {@link IEventThisPlaceHolder} to `TThis`
* @internal
*/

@@ -927,2 +1006,3 @@ export declare type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {

* party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.
* @internal
*/

@@ -940,2 +1020,3 @@ export declare interface Tagged<V, T extends string = string> {

* General best practice is to explicitly log the fields you care about from objects.
* @internal
*/

@@ -948,2 +1029,3 @@ export declare type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;

* @deprecated Moved to \@fluidframework/telemetry-utils package
* @internal
*/

@@ -956,2 +1038,3 @@ export declare type TelemetryEventCategory = "generic" | "error" | "performance";

* @deprecated Renamed to {@link TelemetryBaseEventPropertyType}
* @internal
*/

@@ -963,2 +1046,3 @@ export declare type TelemetryEventPropertyType = string | number | boolean | undefined;

* arguments and having the overload return `TTHis` as well
* @internal
*/

@@ -965,0 +1049,0 @@ export declare type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;

@@ -7,2 +7,3 @@ /*!

* Base interface for objects that require lifetime management via explicit disposal.
* @internal
*/

@@ -9,0 +10,0 @@ export interface IDisposable {

@@ -8,2 +8,3 @@ /*!

* Error types the Fluid Framework may report.
* @internal
*/

@@ -32,2 +33,5 @@ export declare const FluidErrorTypes: {

};
/**
* @internal
*/
export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];

@@ -43,2 +47,3 @@ /**

* Runtime and others will follow soon.
* @internal
*/

@@ -81,2 +86,3 @@ export interface IErrorBase extends Partial<Error> {

* Generic wrapper for an unrecognized/uncategorized error object
* @internal
*/

@@ -92,2 +98,3 @@ export interface IGenericError extends IErrorBase {

* Error indicating an API is being used improperly resulting in an invalid operation.
* @internal
*/

@@ -102,2 +109,3 @@ export interface IUsageError extends IErrorBase {

* Warning emitted when requests to storage are being throttled
* @internal
*/

@@ -104,0 +112,0 @@ export interface IThrottlingWarning extends IErrorBase {

@@ -10,2 +10,3 @@ "use strict";

* Error types the Fluid Framework may report.
* @internal
*/

@@ -12,0 +13,0 @@ exports.FluidErrorTypes = {

@@ -7,2 +7,3 @@ /*!

* Base interface for event emitters.
* @internal
*/

@@ -24,2 +25,3 @@ export interface IEvent {

* Base interface for error event emitters.
* @internal
*/

@@ -36,2 +38,3 @@ export interface IErrorEvent extends IEvent {

* Base interface for event providers.
* @internal
*/

@@ -74,3 +77,3 @@ export interface IEventProvider<TEvent extends IEvent> {

* interface B will now extend interface A and its events
*
* @internal
*/

@@ -80,2 +83,3 @@ export type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;

* The placeholder type that should be used instead of `this` in events.
* @internal
*/

@@ -87,2 +91,3 @@ export type IEventThisPlaceHolder = {

* Does the type replacement by changing types of {@link IEventThisPlaceHolder} to `TThis`
* @internal
*/

@@ -95,2 +100,3 @@ export type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {

* arguments and having the overload return `TTHis` as well
* @internal
*/

@@ -106,2 +112,3 @@ export type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;

* If we need to move beyond 15 we should evaluate using a mapped type pattern like `{"event":(listenerArgs)=>void}`
* @internal
*/

@@ -108,0 +115,0 @@ export type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {

@@ -6,3 +6,9 @@ /*!

import { IFluidHandle } from "./handles";
/**
* @internal
*/
export declare const IFluidLoadable: keyof IProvideFluidLoadable;
/**
* @internal
*/
export interface IProvideFluidLoadable {

@@ -13,2 +19,3 @@ readonly IFluidLoadable: IFluidLoadable;

* A shared FluidObject has a URL from which it can be referenced
* @internal
*/

@@ -18,6 +25,15 @@ export interface IFluidLoadable extends IProvideFluidLoadable {

}
/**
* @internal
*/
export declare const IFluidRunnable: keyof IProvideFluidRunnable;
/**
* @internal
*/
export interface IProvideFluidRunnable {
readonly IFluidRunnable: IFluidRunnable;
}
/**
* @internal
*/
export interface IFluidRunnable {

@@ -24,0 +40,0 @@ run(...args: any[]): Promise<void>;

@@ -8,4 +8,10 @@ "use strict";

exports.IFluidRunnable = exports.IFluidLoadable = void 0;
/**
* @internal
*/
exports.IFluidLoadable = "IFluidLoadable";
/**
* @internal
*/
exports.IFluidRunnable = "IFluidRunnable";
//# sourceMappingURL=fluidLoadable.js.map

@@ -10,2 +10,3 @@ /*!

* to have code loading modules in same package.
* @internal
*/

@@ -40,2 +41,3 @@ export interface IFluidPackageEnvironment {

* to have code loading modules in same package.
* @internal
*/

@@ -71,2 +73,3 @@ export interface IFluidPackage {

* @param pkg - The package json data to check if it is a Fluid package.
* @internal
*/

@@ -79,2 +82,3 @@ export declare const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;

* to have code loading modules in same package.
* @internal
*/

@@ -89,2 +93,3 @@ export interface IFluidCodeDetailsConfig {

* to have code loading modules in same package.
* @internal
*/

@@ -105,2 +110,3 @@ export interface IFluidCodeDetails {

* to have code loading modules in same package.
* @internal
*/

@@ -111,2 +117,3 @@ export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;

* to have code loading modules in same package.
* @internal
*/

@@ -117,2 +124,3 @@ export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;

* to have code loading modules in same package.
* @internal
*/

@@ -127,2 +135,3 @@ export interface IProvideFluidCodeDetailsComparer {

* to have code loading modules in same package.
* @internal
*/

@@ -129,0 +138,0 @@ export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {

@@ -15,2 +15,3 @@ "use strict";

* @param pkg - The package json data to check if it is a Fluid package.
* @internal
*/

@@ -25,2 +26,3 @@ const isFluidPackage = (pkg) => typeof pkg === "object" &&

* to have code loading modules in same package.
* @internal
*/

@@ -38,4 +40,5 @@ const isFluidCodeDetails = (details) => {

* to have code loading modules in same package.
* @internal
*/
exports.IFluidCodeDetailsComparer = "IFluidCodeDetailsComparer";
//# sourceMappingURL=fluidPackage.js.map

@@ -5,5 +5,11 @@ /*!

*/
/**
* @internal
*/
export interface IRequestHeader {
[index: string]: any;
}
/**
* @internal
*/
export interface IRequest {

@@ -13,2 +19,5 @@ url: string;

}
/**
* @internal
*/
export interface IResponse {

@@ -25,2 +34,3 @@ mimeType: string;

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/

@@ -31,2 +41,3 @@ export declare const IFluidRouter: keyof IProvideFluidRouter;

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/

@@ -38,2 +49,3 @@ export interface IProvideFluidRouter {

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/

@@ -40,0 +52,0 @@ export interface IFluidRouter extends IProvideFluidRouter {

@@ -10,4 +10,5 @@ "use strict";

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/
exports.IFluidRouter = "IFluidRouter";
//# sourceMappingURL=fluidRouter.js.map

@@ -8,3 +8,9 @@ /*!

import { FluidObject } from "./provider";
/**
* @internal
*/
export declare const IFluidHandleContext: keyof IProvideFluidHandleContext;
/**
* @internal
*/
export interface IProvideFluidHandleContext {

@@ -15,2 +21,3 @@ readonly IFluidHandleContext: IFluidHandleContext;

* Describes a routing context from which other `IFluidHandleContext`s are defined.
* @internal
*/

@@ -37,3 +44,9 @@ export interface IFluidHandleContext extends IProvideFluidHandleContext {

}
/**
* @internal
*/
export declare const IFluidHandle: keyof IProvideFluidHandle;
/**
* @internal
*/
export interface IProvideFluidHandle {

@@ -44,2 +57,3 @@ readonly IFluidHandle: IFluidHandle;

* Handle to a shared {@link FluidObject}.
* @internal
*/

@@ -46,0 +60,0 @@ export interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvideFluidHandle {

@@ -8,4 +8,10 @@ "use strict";

exports.IFluidHandle = exports.IFluidHandleContext = void 0;
/**
* @internal
*/
exports.IFluidHandleContext = "IFluidHandleContext";
/**
* @internal
*/
exports.IFluidHandle = "IFluidHandle";
//# sourceMappingURL=handles.js.map

@@ -9,2 +9,3 @@ /*!

* @deprecated Moved to \@fluidframework/telemetry-utils package
* @internal
*/

@@ -18,2 +19,3 @@ export type TelemetryEventCategory = "generic" | "error" | "performance";

* General best practice is to explicitly log the fields you care about from objects.
* @internal
*/

@@ -25,2 +27,3 @@ export type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;

* @deprecated Renamed to {@link TelemetryBaseEventPropertyType}
* @internal
*/

@@ -34,2 +37,3 @@ export type TelemetryEventPropertyType = string | number | boolean | undefined;

* party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.
* @internal
*/

@@ -44,2 +48,3 @@ export interface Tagged<V, T extends string = string> {

* @deprecated Use Tagged\<TelemetryBaseEventPropertyType\>
* @internal
*/

@@ -52,2 +57,3 @@ export interface ITaggedTelemetryPropertyType {

* JSON-serializable properties, which will be logged with telemetry.
* @internal
*/

@@ -59,2 +65,3 @@ export type ITelemetryBaseProperties = ITelemetryProperties;

* @deprecated Renamed to {@link ITelemetryBaseProperties}
* @internal
*/

@@ -69,2 +76,3 @@ export interface ITelemetryProperties {

* @param eventName - name of the event.
* @internal
*/

@@ -77,2 +85,3 @@ export interface ITelemetryBaseEvent extends ITelemetryBaseProperties {

* Specify levels of the logs.
* @internal
*/

@@ -86,2 +95,3 @@ export declare const LogLevel: {

* Specify a level to the log to filter out logs based on the level.
* @internal
*/

@@ -92,2 +102,3 @@ export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];

* Implemented by hosting app / loader
* @internal
*/

@@ -104,2 +115,3 @@ export interface ITelemetryBaseLogger {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -116,2 +128,3 @@ export interface ITelemetryGenericEvent extends ITelemetryProperties {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -127,2 +140,3 @@ export interface ITelemetryErrorEvent extends ITelemetryProperties {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -134,2 +148,3 @@ export interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {

* An error object that supports exporting its properties to be logged to telemetry
* @internal
*/

@@ -149,2 +164,3 @@ export interface ILoggingError extends Error {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -151,0 +167,0 @@ export interface ITelemetryLogger extends ITelemetryBaseLogger {

@@ -10,2 +10,3 @@ "use strict";

* Specify levels of the logs.
* @internal
*/

@@ -12,0 +13,0 @@ exports.LogLevel = {

@@ -29,2 +29,3 @@ /*!

* to FluidObject pattern.
* @internal
*/

@@ -63,3 +64,3 @@ export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;

* `FluidObject<IFoo & IBar>`
*
* @internal
*/

@@ -76,5 +77,5 @@ export type FluidObject<T = unknown> = {

* For example `FluidObjectKeys<IFoo & IBar>` would result in `"IFoo" | "IBar"`
*
* @internal
*/
export type FluidObjectKeys<T> = keyof FluidObject<T>;
//# sourceMappingURL=provider.d.ts.map

@@ -1,907 +0,107 @@

/**
* Allows an interface to extend interfaces that already extend an {@link IEventProvider}.
*
* @example
*
* ``` typescript
* interface AEvents extends IEvent{
* (event: "a-event",listener: (a: number)=>void);
* }
* interface A extends IEventProvider<AEvents>{
* a: object;
* }
*
* interface BEvents extends IEvent{
* (event: "b-event",listener: (b: string)=>void);
* }
* interface B extends ExtendEventProvider<AEvents, A, BEvents>{
* b: boolean;
* };
* ```
*
* interface B will now extend interface A and its events
*
*/
export declare type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;
/* Excluded from this release type: ExtendEventProvider */
/**
* Error types the Fluid Framework may report.
*/
export declare const FluidErrorTypes: {
/**
* Some error, most likely an exception caught by runtime and propagated to container as critical error
*/
readonly genericError: "genericError";
/**
* Throttling error from server. Server is busy and is asking not to reconnect for some time
*/
readonly throttlingError: "throttlingError";
/**
* Data loss error detected by Container / DeltaManager. Likely points to storage issue.
*/
readonly dataCorruptionError: "dataCorruptionError";
/**
* Error encountered when processing an operation. May correlate with data corruption.
*/
readonly dataProcessingError: "dataProcessingError";
/**
* Error indicating an API is being used improperly resulting in an invalid operation.
*/
readonly usageError: "usageError";
};
/* Excluded from this release type: FluidErrorTypes */
export declare type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];
/* Excluded from this release type: FluidObject */
/**
* This utility type take interface(s) that follow the FluidObject pattern, and produces
* a new type that can be used for inspection and discovery of those interfaces.
*
* It is meant to be used with types that are known to implement the FluidObject pattern.
* A common way to specify a type implements the FluidObject pattern is to expose it as a
* FluidObject without a generic argument.
*
* @example
*
* For example, if we have an interface like the following:
*
* ```typescript
* interface IProvideFoo{
* IFoo: IFoo
* }
* interface IFoo extends IProvideFoo{
* foobar();
* }
* ```
*
* and a function that returns a FluidObject. You would do the following
*
* `const maybeFoo: FluidObject<IFoo> = getFluidObject()`;
*
* Either IFoo or IProvideFoo are valid generic arguments. In both case
* maybeFoo will be of type `{IFoo?: IFoo}`. If IFoo is not undefined,
* then the FluidObject provides IFoo, and it can be used.
*
* You can inspect multiple types via a intersection. For example:
* `FluidObject<IFoo & IBar>`
*
*/
export declare type FluidObject<T = unknown> = {
[P in FluidObjectProviderKeys<T>]?: T[P];
};
/* Excluded from this release type: FluidObjectKeys */
/**
* This utility type creates a type that is the union of all keys on the generic type
* which implement the FluidObject pattern.
*
* See {@link FluidObject}
*
* For example `FluidObjectKeys<IFoo & IBar>` would result in `"IFoo" | "IBar"`
*
*/
export declare type FluidObjectKeys<T> = keyof FluidObject<T>;
/* Excluded from this release type: FluidObjectProviderKeys */
/**
* Produces a valid FluidObject key given a type and a property.
*
* @remarks
*
* A valid FluidObject key is a property that exists on the incoming type
* as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`
* This aligns with the FluidObject pattern expected to be used with all FluidObjects.
*
* This utility type is meant for internal use by {@link FluidObject}
*
* @example
*
* ```typescript
* interface IProvideFoo{
* IFoo: IFoo
* }
* interface IFoo extends IProvideFoo{
* foobar();
* }
* ```
*
* This pattern enables discovery, and delegation in a standard way which is central
* to FluidObject pattern.
*/
export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
/* Excluded from this release type: IDisposable */
/**
* Base interface for objects that require lifetime management via explicit disposal.
*/
export declare interface IDisposable {
/**
* Whether or not the object has been disposed.
* If true, the object should be considered invalid, and its other state should be disregarded.
*/
readonly disposed: boolean;
/**
* Dispose of the object and its resources.
* @param error - Optional error indicating the reason for the disposal, if the object was
* disposed as the result of an error.
*/
dispose(error?: Error): void;
}
/* Excluded from this release type: IErrorBase */
/**
* Base interface for all errors and warnings emitted the container.
*
* @remarks
*
* We are in the process of unifying error types across layers of the Framework. For now we have only migrated
* those from container-definitions. Once fully migrated, this will be a base interface for all errors and
* warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.
* Runtime and others will follow soon.
*/
export declare interface IErrorBase extends Partial<Error> {
/**
* A type tag differentiating kinds of errors emitted by the container.
*
* @see See {@link FluidErrorTypes#genericError} for some common examples.
* - container
* - runtime
* - drivers
*/
readonly errorType: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}
*
* @remarks
*
* Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)
* If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result
* of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.
*/
readonly message: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}
*/
readonly name?: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}
*/
readonly stack?: string;
/**
* Returns all properties of this error object that are fit for logging.
* Some may be tagged to indicate they contain some kind of sensitive data.
*/
getTelemetryProperties?(): ITelemetryBaseProperties;
}
/* Excluded from this release type: IErrorEvent */
/**
* Base interface for error event emitters.
*/
export declare interface IErrorEvent extends IEvent {
/**
* Base error event emitter signature.
*
* @eventProperty
*/
(event: "error", listener: (message: any) => void): any;
}
/* Excluded from this release type: IEvent */
/**
* Base interface for event emitters.
*/
export declare interface IEvent {
/**
* Base event emitter signature.
*
* @remarks The event emitter polyfill and the node event emitter have different event types:
* `string | symbol` vs. `string | number`.
*
* So for our typing we'll contrain to string, that way we work with both.
*
* @eventProperty
*/
(event: string, listener: (...args: any[]) => void): any;
}
/* Excluded from this release type: IEventProvider */
/**
* Base interface for event providers.
*/
export declare interface IEventProvider<TEvent extends IEvent> {
/**
* Registers a callback to be invoked when the corresponding event is triggered.
*/
readonly on: IEventTransformer<this, TEvent>;
/**
* Registers a callback to be invoked the first time (after registration) the corresponding event is triggered.
*/
readonly once: IEventTransformer<this, TEvent>;
/**
* Removes the corresponding event if it has been registered.
*/
readonly off: IEventTransformer<this, TEvent>;
}
/* Excluded from this release type: IEventThisPlaceHolder */
/**
* The placeholder type that should be used instead of `this` in events.
*/
export declare type IEventThisPlaceHolder = {
thisPlaceHolder: "thisPlaceHolder";
};
/* Excluded from this release type: IEventTransformer */
/**
* This type is a conditional type for transforming all the overloads provided in `TEvent`.
*
* @remarks
* Due to limitations of the TypeScript typing system, we need to handle each number of overload individually.
* It currently supports the max of 15 event overloads which is more than we use anywhere.
* At more than 15 overloads we start to hit {@link https://github.com/microsoft/TypeScript/issues/37209 | TS2589}.
* If we need to move beyond 15 we should evaluate using a mapped type pattern like `{"event":(listenerArgs)=>void}`
*/
export declare type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: infer E13, listener: (...args: infer A13) => void): any;
(event: infer E14, listener: (...args: infer A14) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> & TransformedEvent<TThis, E13, A13> & TransformedEvent<TThis, E14, A14> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: infer E13, listener: (...args: infer A13) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> & TransformedEvent<TThis, E13, A13> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> : TransformedEvent<TThis, string, any[]>;
/* Excluded from this release type: IFluidCodeDetails */
/**
* Data structure used to describe the code to load on the Fluid document.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetails}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetails {
/**
* The code package to be used on the Fluid document. This is either the package name which will be loaded
* from a package manager. Or the expanded Fluid package.
*/
readonly package: string | Readonly<IFluidPackage>;
/**
* Configuration details. This includes links to the package manager and base CDNs.
*/
readonly config?: IFluidCodeDetailsConfig;
}
/* Excluded from this release type: IFluidCodeDetailsComparer */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
/* Excluded from this release type: IFluidCodeDetailsConfig */
/**
* Provides capability to compare Fluid code details.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
/**
* Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.
*
* Similar semantics to:
* {@link https://github.com/npm/node-semver#usage}
*/
satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
/**
* Returns a number representing the ascending sort order of the `a` and `b` code details:
*
* - `< 0` if `a < b`.
*
* - `= 0` if `a === b`.
*
* - `> 0` if `a > b`.
*
* - `undefined` if `a` is not comparable to `b`.
*
* Similar semantics to:
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description | Array.sort}
*/
compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
}
/* Excluded from this release type: IFluidHandle */
/**
* Package manager configuration. Provides a key value mapping of config values.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsConfig}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetailsConfig {
readonly [key: string]: string;
}
/* Excluded from this release type: IFluidHandleContext */
export declare const IFluidHandle: keyof IProvideFluidHandle;
/* Excluded from this release type: IFluidLoadable */
/**
* Handle to a shared {@link FluidObject}.
*/
export declare interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvideFluidHandle {
/**
* @deprecated Do not use handle's path for routing. Use `get` to get the underlying object.
*
* The absolute path to the handle context from the root.
*/
readonly absolutePath: string;
/**
* Flag indicating whether or not the entity has services attached.
*/
readonly isAttached: boolean;
/**
* @deprecated To be removed. This is part of an internal API surface and should not be called.
*
* Runs through the graph and attach the bounded handles.
*/
attachGraph(): void;
/**
* Returns a promise to the Fluid Object referenced by the handle.
*/
get(): Promise<T>;
/**
* @deprecated To be removed. This is part of an internal API surface and should not be called.
*
* Binds the given handle to this one or attach the given handle if this handle is attached.
* A bound handle will also be attached once this handle is attached.
*/
bind(handle: IFluidHandle): void;
}
/* Excluded from this release type: IFluidPackage */
export declare const IFluidHandleContext: keyof IProvideFluidHandleContext;
/* Excluded from this release type: IFluidPackageEnvironment */
/**
* Describes a routing context from which other `IFluidHandleContext`s are defined.
*/
export declare interface IFluidHandleContext extends IProvideFluidHandleContext {
/**
* The absolute path to the handle context from the root.
*/
readonly absolutePath: string;
/**
* The parent IFluidHandleContext that has provided a route path to this IFluidHandleContext or undefined
* at the root.
*/
readonly routeContext?: IFluidHandleContext;
/**
* Flag indicating whether or not the entity has services attached.
*/
readonly isAttached: boolean;
/**
* Runs through the graph and attach the bounded handles.
*/
attachGraph(): void;
resolveHandle(request: IRequest): Promise<IResponse>;
}
/* Excluded from this release type: IFluidRouter */
export declare const IFluidLoadable: keyof IProvideFluidLoadable;
/* Excluded from this release type: IFluidRunnable */
/**
* A shared FluidObject has a URL from which it can be referenced
*/
export declare interface IFluidLoadable extends IProvideFluidLoadable {
handle: IFluidHandle;
}
/* Excluded from this release type: IGenericError */
/**
* Fluid-specific properties expected on a package to be loaded by the code loader.
* While compatible with the npm package format it is not necessary that that package is an
* npm package:
* {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}
*
* @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackage}
* to have code loading modules in same package.
*/
export declare interface IFluidPackage {
/**
* The name of the package that this code represnets
*/
name: string;
/**
* This object represents the Fluid specific properties of the package
*/
fluid: {
/**
* The name of the of the environment. This should be something like browser, or node
* and contain the necessary targets for loading this code in that environment.
*/
[environment: string]: undefined | IFluidPackageEnvironment;
};
/**
* General access for extended fields as specific usages will
* likely have additional infornamation like a definition of
* compatible versions, or deployment information like rings or rollouts.
*/
[key: string]: unknown;
}
/* Excluded from this release type: ILoggingError */
/**
* Specifies an environment on Fluid property of an {@link IFluidPackage}.
*
* @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackageEnvironment}
* to have code loading modules in same package.
*/
export declare interface IFluidPackageEnvironment {
/**
* The name of the target. For a browser environment, this could be umd for scripts
* or css for styles.
*/
[target: string]: undefined | {
/**
* List of files for the target. These can be relative or absolute.
* The code loader should resolve relative paths, and validate all
* full urls.
*/
files: string[];
/**
* General access for extended fields as specific usages will
* likely have additional infornamation like a definition
* of Library, the entrypoint for umd packages
*/
[key: string]: unknown;
};
}
/* Excluded from this release type: IProvideFluidCodeDetailsComparer */
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare const IFluidRouter: keyof IProvideFluidRouter;
/* Excluded from this release type: IProvideFluidHandle */
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare interface IFluidRouter extends IProvideFluidRouter {
request(request: IRequest): Promise<IResponse>;
}
/* Excluded from this release type: IProvideFluidHandleContext */
export declare const IFluidRunnable: keyof IProvideFluidRunnable;
/* Excluded from this release type: IProvideFluidLoadable */
export declare interface IFluidRunnable {
run(...args: any[]): Promise<void>;
stop(reason?: string): void;
}
/* Excluded from this release type: IProvideFluidRouter */
/**
* Generic wrapper for an unrecognized/uncategorized error object
*/
export declare interface IGenericError extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.genericError;
error?: any;
}
/* Excluded from this release type: IProvideFluidRunnable */
/**
* An error object that supports exporting its properties to be logged to telemetry
*/
export declare interface ILoggingError extends Error {
/**
* Return all properties from this object that should be logged to telemetry
*/
getTelemetryProperties(): ITelemetryBaseProperties;
}
/* Excluded from this release type: IRequest */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#IProvideFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare interface IProvideFluidCodeDetailsComparer {
readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
}
/* Excluded from this release type: IRequestHeader */
export declare interface IProvideFluidHandle {
readonly IFluidHandle: IFluidHandle;
}
/* Excluded from this release type: IResponse */
export declare interface IProvideFluidHandleContext {
readonly IFluidHandleContext: IFluidHandleContext;
}
/* Excluded from this release type: isFluidCodeDetails */
export declare interface IProvideFluidLoadable {
readonly IFluidLoadable: IFluidLoadable;
}
/* Excluded from this release type: isFluidPackage */
/**
* Request routing
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare interface IProvideFluidRouter {
readonly IFluidRouter: IFluidRouter;
}
/* Excluded from this release type: ITaggedTelemetryPropertyType */
export declare interface IProvideFluidRunnable {
readonly IFluidRunnable: IFluidRunnable;
}
/* Excluded from this release type: ITelemetryBaseEvent */
export declare interface IRequest {
url: string;
headers?: IRequestHeader;
}
/* Excluded from this release type: ITelemetryBaseLogger */
export declare interface IRequestHeader {
[index: string]: any;
}
/* Excluded from this release type: ITelemetryBaseProperties */
export declare interface IResponse {
mimeType: string;
status: number;
value: any;
headers?: {
[key: string]: any;
};
stack?: string;
}
/* Excluded from this release type: ITelemetryErrorEvent */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#isFluidCodeDetails}
* to have code loading modules in same package.
*/
export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
/* Excluded from this release type: ITelemetryGenericEvent */
/**
* Check if the package.json defines a Fluid package.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#isFluidPackage}
* to have code loading modules in same package.
*
* @param pkg - The package json data to check if it is a Fluid package.
*/
export declare const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;
/* Excluded from this release type: ITelemetryLogger */
/**
* @see {@link Tagged} for info on tagging
*
* @deprecated Use Tagged\<TelemetryBaseEventPropertyType\>
*/
export declare interface ITaggedTelemetryPropertyType {
value: TelemetryEventPropertyType;
tag: string;
}
/* Excluded from this release type: ITelemetryPerformanceEvent */
/**
* Base interface for logging telemetry statements.
* Can contain any number of properties that get serialized as json payload.
* @param category - category of the event, like "error", "performance", "generic", etc.
* @param eventName - name of the event.
*/
export declare interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
category: string;
eventName: string;
}
/* Excluded from this release type: ITelemetryProperties */
/**
* Interface to output telemetry events.
* Implemented by hosting app / loader
*/
export declare interface ITelemetryBaseLogger {
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
minLogLevel?: LogLevel;
}
/* Excluded from this release type: IThrottlingWarning */
/**
* JSON-serializable properties, which will be logged with telemetry.
*/
export declare type ITelemetryBaseProperties = ITelemetryProperties;
/* Excluded from this release type: IUsageError */
/**
* Error telemetry event.
* Maps to category = "error"
*
* @deprecated For internal use within FluidFramework, use ITelemetryErrorEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryErrorEvent extends ITelemetryProperties {
eventName: string;
}
/* Excluded from this release type: LogLevel */
/**
* Informational (non-error) telemetry event
* Maps to category = "generic"
*
* @deprecated For internal use within FluidFramework, use ITelemetryGenericEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryGenericEvent extends ITelemetryProperties {
eventName: string;
category?: TelemetryEventCategory;
}
/* Excluded from this release type: ReplaceIEventThisPlaceHolder */
/**
* ITelemetryLogger interface contains various helper telemetry methods,
* encoding in one place schemas for various types of Fluid telemetry events.
* Creates sub-logger that appends properties to all events
*
* @deprecated For internal use within FluidFramework, use ITelemetryLoggerExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryLogger extends ITelemetryBaseLogger {
/**
* Actual implementation that sends telemetry event
* Implemented by derived classes
* @param event - Telemetry event to send over
* @param logLevel - optional level of the log.
*/
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
/**
* Send information telemetry event
* @param event - Event to send
* @param error - optional error object to log
* @param logLevel - optional level of the log.
*/
sendTelemetryEvent(event: ITelemetryGenericEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
/**
* Send error telemetry event
* @param event - Event to send
* @param error - optional error object to log
*/
sendErrorEvent(event: ITelemetryErrorEvent, error?: any): void;
/**
* Send performance telemetry event
* @param event - Event to send
* @param error - optional error object to log
* @param logLevel - optional level of the log.
*/
sendPerformanceEvent(event: ITelemetryPerformanceEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
}
/* Excluded from this release type: Tagged */
/**
* Performance telemetry event.
* Maps to category = "performance"
*
* @deprecated For internal use within FluidFramework, use ITelemetryPerformanceEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {
duration?: number;
}
/* Excluded from this release type: TelemetryBaseEventPropertyType */
/**
* {@inheritDoc ITelemetryBaseProperties}
*
* @deprecated Renamed to {@link ITelemetryBaseProperties}
*/
export declare interface ITelemetryProperties {
[index: string]: TelemetryEventPropertyType | Tagged<TelemetryEventPropertyType>;
}
/* Excluded from this release type: TelemetryEventCategory */
/**
* Warning emitted when requests to storage are being throttled
*/
export declare interface IThrottlingWarning extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.throttlingError;
readonly retryAfterSeconds: number;
}
/* Excluded from this release type: TelemetryEventPropertyType */
/**
* Error indicating an API is being used improperly resulting in an invalid operation.
*/
export declare interface IUsageError extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.usageError;
}
/* Excluded from this release type: TransformedEvent */
/**
* Specify levels of the logs.
*/
export declare const LogLevel: {
readonly verbose: 10;
readonly default: 20;
readonly error: 30;
};
/**
* Specify a level to the log to filter out logs based on the level.
*/
export declare type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
/**
* Does the type replacement by changing types of {@link IEventThisPlaceHolder} to `TThis`
*/
export declare type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {
[K in keyof L]: L[K] extends IEventThisPlaceHolder ? TThis : L[K];
} : L;
/**
* A property to be logged to telemetry may require a tag indicating the value may contain sensitive data.
* This type wraps a value of the given type V in an object along with a string tag (type can be further specified as T).
*
* This indicates that the value should be organized or handled differently by loggers in various first or third
* party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.
*/
export declare interface Tagged<V, T extends string = string> {
value: V;
tag: T;
}
/**
* Property types that can be logged.
*
* @remarks Logging entire objects is considered extremely dangerous from a telemetry point of view because people can
* easily add fields to objects that shouldn't be logged and not realize it's going to be logged.
* General best practice is to explicitly log the fields you care about from objects.
*/
export declare type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;
/**
* Examples of known categories, however category can be any string for extensibility.
*
* @deprecated Moved to \@fluidframework/telemetry-utils package
*/
export declare type TelemetryEventCategory = "generic" | "error" | "performance";
/**
* {@inheritDoc TelemetryBaseEventPropertyType}
*
* @deprecated Renamed to {@link TelemetryBaseEventPropertyType}
*/
export declare type TelemetryEventPropertyType = string | number | boolean | undefined;
/**
* Transforms the event overload by replacing {@link IEventThisPlaceHolder} with `TThis` in the event listener
* arguments and having the overload return `TTHis` as well
*/
export declare type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
export { }

@@ -1,907 +0,107 @@

/**
* Allows an interface to extend interfaces that already extend an {@link IEventProvider}.
*
* @example
*
* ``` typescript
* interface AEvents extends IEvent{
* (event: "a-event",listener: (a: number)=>void);
* }
* interface A extends IEventProvider<AEvents>{
* a: object;
* }
*
* interface BEvents extends IEvent{
* (event: "b-event",listener: (b: string)=>void);
* }
* interface B extends ExtendEventProvider<AEvents, A, BEvents>{
* b: boolean;
* };
* ```
*
* interface B will now extend interface A and its events
*
*/
export declare type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;
/* Excluded from this release type: ExtendEventProvider */
/**
* Error types the Fluid Framework may report.
*/
export declare const FluidErrorTypes: {
/**
* Some error, most likely an exception caught by runtime and propagated to container as critical error
*/
readonly genericError: "genericError";
/**
* Throttling error from server. Server is busy and is asking not to reconnect for some time
*/
readonly throttlingError: "throttlingError";
/**
* Data loss error detected by Container / DeltaManager. Likely points to storage issue.
*/
readonly dataCorruptionError: "dataCorruptionError";
/**
* Error encountered when processing an operation. May correlate with data corruption.
*/
readonly dataProcessingError: "dataProcessingError";
/**
* Error indicating an API is being used improperly resulting in an invalid operation.
*/
readonly usageError: "usageError";
};
/* Excluded from this release type: FluidErrorTypes */
export declare type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];
/* Excluded from this release type: FluidObject */
/**
* This utility type take interface(s) that follow the FluidObject pattern, and produces
* a new type that can be used for inspection and discovery of those interfaces.
*
* It is meant to be used with types that are known to implement the FluidObject pattern.
* A common way to specify a type implements the FluidObject pattern is to expose it as a
* FluidObject without a generic argument.
*
* @example
*
* For example, if we have an interface like the following:
*
* ```typescript
* interface IProvideFoo{
* IFoo: IFoo
* }
* interface IFoo extends IProvideFoo{
* foobar();
* }
* ```
*
* and a function that returns a FluidObject. You would do the following
*
* `const maybeFoo: FluidObject<IFoo> = getFluidObject()`;
*
* Either IFoo or IProvideFoo are valid generic arguments. In both case
* maybeFoo will be of type `{IFoo?: IFoo}`. If IFoo is not undefined,
* then the FluidObject provides IFoo, and it can be used.
*
* You can inspect multiple types via a intersection. For example:
* `FluidObject<IFoo & IBar>`
*
*/
export declare type FluidObject<T = unknown> = {
[P in FluidObjectProviderKeys<T>]?: T[P];
};
/* Excluded from this release type: FluidObjectKeys */
/**
* This utility type creates a type that is the union of all keys on the generic type
* which implement the FluidObject pattern.
*
* See {@link FluidObject}
*
* For example `FluidObjectKeys<IFoo & IBar>` would result in `"IFoo" | "IBar"`
*
*/
export declare type FluidObjectKeys<T> = keyof FluidObject<T>;
/* Excluded from this release type: FluidObjectProviderKeys */
/**
* Produces a valid FluidObject key given a type and a property.
*
* @remarks
*
* A valid FluidObject key is a property that exists on the incoming type
* as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`
* This aligns with the FluidObject pattern expected to be used with all FluidObjects.
*
* This utility type is meant for internal use by {@link FluidObject}
*
* @example
*
* ```typescript
* interface IProvideFoo{
* IFoo: IFoo
* }
* interface IFoo extends IProvideFoo{
* foobar();
* }
* ```
*
* This pattern enables discovery, and delegation in a standard way which is central
* to FluidObject pattern.
*/
export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
/* Excluded from this release type: IDisposable */
/**
* Base interface for objects that require lifetime management via explicit disposal.
*/
export declare interface IDisposable {
/**
* Whether or not the object has been disposed.
* If true, the object should be considered invalid, and its other state should be disregarded.
*/
readonly disposed: boolean;
/**
* Dispose of the object and its resources.
* @param error - Optional error indicating the reason for the disposal, if the object was
* disposed as the result of an error.
*/
dispose(error?: Error): void;
}
/* Excluded from this release type: IErrorBase */
/**
* Base interface for all errors and warnings emitted the container.
*
* @remarks
*
* We are in the process of unifying error types across layers of the Framework. For now we have only migrated
* those from container-definitions. Once fully migrated, this will be a base interface for all errors and
* warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.
* Runtime and others will follow soon.
*/
export declare interface IErrorBase extends Partial<Error> {
/**
* A type tag differentiating kinds of errors emitted by the container.
*
* @see See {@link FluidErrorTypes#genericError} for some common examples.
* - container
* - runtime
* - drivers
*/
readonly errorType: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}
*
* @remarks
*
* Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)
* If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result
* of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.
*/
readonly message: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}
*/
readonly name?: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}
*/
readonly stack?: string;
/**
* Returns all properties of this error object that are fit for logging.
* Some may be tagged to indicate they contain some kind of sensitive data.
*/
getTelemetryProperties?(): ITelemetryBaseProperties;
}
/* Excluded from this release type: IErrorEvent */
/**
* Base interface for error event emitters.
*/
export declare interface IErrorEvent extends IEvent {
/**
* Base error event emitter signature.
*
* @eventProperty
*/
(event: "error", listener: (message: any) => void): any;
}
/* Excluded from this release type: IEvent */
/**
* Base interface for event emitters.
*/
export declare interface IEvent {
/**
* Base event emitter signature.
*
* @remarks The event emitter polyfill and the node event emitter have different event types:
* `string | symbol` vs. `string | number`.
*
* So for our typing we'll contrain to string, that way we work with both.
*
* @eventProperty
*/
(event: string, listener: (...args: any[]) => void): any;
}
/* Excluded from this release type: IEventProvider */
/**
* Base interface for event providers.
*/
export declare interface IEventProvider<TEvent extends IEvent> {
/**
* Registers a callback to be invoked when the corresponding event is triggered.
*/
readonly on: IEventTransformer<this, TEvent>;
/**
* Registers a callback to be invoked the first time (after registration) the corresponding event is triggered.
*/
readonly once: IEventTransformer<this, TEvent>;
/**
* Removes the corresponding event if it has been registered.
*/
readonly off: IEventTransformer<this, TEvent>;
}
/* Excluded from this release type: IEventThisPlaceHolder */
/**
* The placeholder type that should be used instead of `this` in events.
*/
export declare type IEventThisPlaceHolder = {
thisPlaceHolder: "thisPlaceHolder";
};
/* Excluded from this release type: IEventTransformer */
/**
* This type is a conditional type for transforming all the overloads provided in `TEvent`.
*
* @remarks
* Due to limitations of the TypeScript typing system, we need to handle each number of overload individually.
* It currently supports the max of 15 event overloads which is more than we use anywhere.
* At more than 15 overloads we start to hit {@link https://github.com/microsoft/TypeScript/issues/37209 | TS2589}.
* If we need to move beyond 15 we should evaluate using a mapped type pattern like `{"event":(listenerArgs)=>void}`
*/
export declare type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: infer E13, listener: (...args: infer A13) => void): any;
(event: infer E14, listener: (...args: infer A14) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> & TransformedEvent<TThis, E13, A13> & TransformedEvent<TThis, E14, A14> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: infer E13, listener: (...args: infer A13) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> & TransformedEvent<TThis, E13, A13> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> : TransformedEvent<TThis, string, any[]>;
/* Excluded from this release type: IFluidCodeDetails */
/**
* Data structure used to describe the code to load on the Fluid document.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetails}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetails {
/**
* The code package to be used on the Fluid document. This is either the package name which will be loaded
* from a package manager. Or the expanded Fluid package.
*/
readonly package: string | Readonly<IFluidPackage>;
/**
* Configuration details. This includes links to the package manager and base CDNs.
*/
readonly config?: IFluidCodeDetailsConfig;
}
/* Excluded from this release type: IFluidCodeDetailsComparer */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
/* Excluded from this release type: IFluidCodeDetailsConfig */
/**
* Provides capability to compare Fluid code details.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
/**
* Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.
*
* Similar semantics to:
* {@link https://github.com/npm/node-semver#usage}
*/
satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
/**
* Returns a number representing the ascending sort order of the `a` and `b` code details:
*
* - `< 0` if `a < b`.
*
* - `= 0` if `a === b`.
*
* - `> 0` if `a > b`.
*
* - `undefined` if `a` is not comparable to `b`.
*
* Similar semantics to:
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description | Array.sort}
*/
compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
}
/* Excluded from this release type: IFluidHandle */
/**
* Package manager configuration. Provides a key value mapping of config values.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsConfig}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetailsConfig {
readonly [key: string]: string;
}
/* Excluded from this release type: IFluidHandleContext */
export declare const IFluidHandle: keyof IProvideFluidHandle;
/* Excluded from this release type: IFluidLoadable */
/**
* Handle to a shared {@link FluidObject}.
*/
export declare interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvideFluidHandle {
/**
* @deprecated Do not use handle's path for routing. Use `get` to get the underlying object.
*
* The absolute path to the handle context from the root.
*/
readonly absolutePath: string;
/**
* Flag indicating whether or not the entity has services attached.
*/
readonly isAttached: boolean;
/**
* @deprecated To be removed. This is part of an internal API surface and should not be called.
*
* Runs through the graph and attach the bounded handles.
*/
attachGraph(): void;
/**
* Returns a promise to the Fluid Object referenced by the handle.
*/
get(): Promise<T>;
/**
* @deprecated To be removed. This is part of an internal API surface and should not be called.
*
* Binds the given handle to this one or attach the given handle if this handle is attached.
* A bound handle will also be attached once this handle is attached.
*/
bind(handle: IFluidHandle): void;
}
/* Excluded from this release type: IFluidPackage */
export declare const IFluidHandleContext: keyof IProvideFluidHandleContext;
/* Excluded from this release type: IFluidPackageEnvironment */
/**
* Describes a routing context from which other `IFluidHandleContext`s are defined.
*/
export declare interface IFluidHandleContext extends IProvideFluidHandleContext {
/**
* The absolute path to the handle context from the root.
*/
readonly absolutePath: string;
/**
* The parent IFluidHandleContext that has provided a route path to this IFluidHandleContext or undefined
* at the root.
*/
readonly routeContext?: IFluidHandleContext;
/**
* Flag indicating whether or not the entity has services attached.
*/
readonly isAttached: boolean;
/**
* Runs through the graph and attach the bounded handles.
*/
attachGraph(): void;
resolveHandle(request: IRequest): Promise<IResponse>;
}
/* Excluded from this release type: IFluidRouter */
export declare const IFluidLoadable: keyof IProvideFluidLoadable;
/* Excluded from this release type: IFluidRunnable */
/**
* A shared FluidObject has a URL from which it can be referenced
*/
export declare interface IFluidLoadable extends IProvideFluidLoadable {
handle: IFluidHandle;
}
/* Excluded from this release type: IGenericError */
/**
* Fluid-specific properties expected on a package to be loaded by the code loader.
* While compatible with the npm package format it is not necessary that that package is an
* npm package:
* {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}
*
* @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackage}
* to have code loading modules in same package.
*/
export declare interface IFluidPackage {
/**
* The name of the package that this code represnets
*/
name: string;
/**
* This object represents the Fluid specific properties of the package
*/
fluid: {
/**
* The name of the of the environment. This should be something like browser, or node
* and contain the necessary targets for loading this code in that environment.
*/
[environment: string]: undefined | IFluidPackageEnvironment;
};
/**
* General access for extended fields as specific usages will
* likely have additional infornamation like a definition of
* compatible versions, or deployment information like rings or rollouts.
*/
[key: string]: unknown;
}
/* Excluded from this release type: ILoggingError */
/**
* Specifies an environment on Fluid property of an {@link IFluidPackage}.
*
* @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackageEnvironment}
* to have code loading modules in same package.
*/
export declare interface IFluidPackageEnvironment {
/**
* The name of the target. For a browser environment, this could be umd for scripts
* or css for styles.
*/
[target: string]: undefined | {
/**
* List of files for the target. These can be relative or absolute.
* The code loader should resolve relative paths, and validate all
* full urls.
*/
files: string[];
/**
* General access for extended fields as specific usages will
* likely have additional infornamation like a definition
* of Library, the entrypoint for umd packages
*/
[key: string]: unknown;
};
}
/* Excluded from this release type: IProvideFluidCodeDetailsComparer */
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare const IFluidRouter: keyof IProvideFluidRouter;
/* Excluded from this release type: IProvideFluidHandle */
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare interface IFluidRouter extends IProvideFluidRouter {
request(request: IRequest): Promise<IResponse>;
}
/* Excluded from this release type: IProvideFluidHandleContext */
export declare const IFluidRunnable: keyof IProvideFluidRunnable;
/* Excluded from this release type: IProvideFluidLoadable */
export declare interface IFluidRunnable {
run(...args: any[]): Promise<void>;
stop(reason?: string): void;
}
/* Excluded from this release type: IProvideFluidRouter */
/**
* Generic wrapper for an unrecognized/uncategorized error object
*/
export declare interface IGenericError extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.genericError;
error?: any;
}
/* Excluded from this release type: IProvideFluidRunnable */
/**
* An error object that supports exporting its properties to be logged to telemetry
*/
export declare interface ILoggingError extends Error {
/**
* Return all properties from this object that should be logged to telemetry
*/
getTelemetryProperties(): ITelemetryBaseProperties;
}
/* Excluded from this release type: IRequest */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#IProvideFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare interface IProvideFluidCodeDetailsComparer {
readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
}
/* Excluded from this release type: IRequestHeader */
export declare interface IProvideFluidHandle {
readonly IFluidHandle: IFluidHandle;
}
/* Excluded from this release type: IResponse */
export declare interface IProvideFluidHandleContext {
readonly IFluidHandleContext: IFluidHandleContext;
}
/* Excluded from this release type: isFluidCodeDetails */
export declare interface IProvideFluidLoadable {
readonly IFluidLoadable: IFluidLoadable;
}
/* Excluded from this release type: isFluidPackage */
/**
* Request routing
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare interface IProvideFluidRouter {
readonly IFluidRouter: IFluidRouter;
}
/* Excluded from this release type: ITaggedTelemetryPropertyType */
export declare interface IProvideFluidRunnable {
readonly IFluidRunnable: IFluidRunnable;
}
/* Excluded from this release type: ITelemetryBaseEvent */
export declare interface IRequest {
url: string;
headers?: IRequestHeader;
}
/* Excluded from this release type: ITelemetryBaseLogger */
export declare interface IRequestHeader {
[index: string]: any;
}
/* Excluded from this release type: ITelemetryBaseProperties */
export declare interface IResponse {
mimeType: string;
status: number;
value: any;
headers?: {
[key: string]: any;
};
stack?: string;
}
/* Excluded from this release type: ITelemetryErrorEvent */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#isFluidCodeDetails}
* to have code loading modules in same package.
*/
export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
/* Excluded from this release type: ITelemetryGenericEvent */
/**
* Check if the package.json defines a Fluid package.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#isFluidPackage}
* to have code loading modules in same package.
*
* @param pkg - The package json data to check if it is a Fluid package.
*/
export declare const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;
/* Excluded from this release type: ITelemetryLogger */
/**
* @see {@link Tagged} for info on tagging
*
* @deprecated Use Tagged\<TelemetryBaseEventPropertyType\>
*/
export declare interface ITaggedTelemetryPropertyType {
value: TelemetryEventPropertyType;
tag: string;
}
/* Excluded from this release type: ITelemetryPerformanceEvent */
/**
* Base interface for logging telemetry statements.
* Can contain any number of properties that get serialized as json payload.
* @param category - category of the event, like "error", "performance", "generic", etc.
* @param eventName - name of the event.
*/
export declare interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
category: string;
eventName: string;
}
/* Excluded from this release type: ITelemetryProperties */
/**
* Interface to output telemetry events.
* Implemented by hosting app / loader
*/
export declare interface ITelemetryBaseLogger {
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
minLogLevel?: LogLevel;
}
/* Excluded from this release type: IThrottlingWarning */
/**
* JSON-serializable properties, which will be logged with telemetry.
*/
export declare type ITelemetryBaseProperties = ITelemetryProperties;
/* Excluded from this release type: IUsageError */
/**
* Error telemetry event.
* Maps to category = "error"
*
* @deprecated For internal use within FluidFramework, use ITelemetryErrorEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryErrorEvent extends ITelemetryProperties {
eventName: string;
}
/* Excluded from this release type: LogLevel */
/**
* Informational (non-error) telemetry event
* Maps to category = "generic"
*
* @deprecated For internal use within FluidFramework, use ITelemetryGenericEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryGenericEvent extends ITelemetryProperties {
eventName: string;
category?: TelemetryEventCategory;
}
/* Excluded from this release type: ReplaceIEventThisPlaceHolder */
/**
* ITelemetryLogger interface contains various helper telemetry methods,
* encoding in one place schemas for various types of Fluid telemetry events.
* Creates sub-logger that appends properties to all events
*
* @deprecated For internal use within FluidFramework, use ITelemetryLoggerExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryLogger extends ITelemetryBaseLogger {
/**
* Actual implementation that sends telemetry event
* Implemented by derived classes
* @param event - Telemetry event to send over
* @param logLevel - optional level of the log.
*/
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
/**
* Send information telemetry event
* @param event - Event to send
* @param error - optional error object to log
* @param logLevel - optional level of the log.
*/
sendTelemetryEvent(event: ITelemetryGenericEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
/**
* Send error telemetry event
* @param event - Event to send
* @param error - optional error object to log
*/
sendErrorEvent(event: ITelemetryErrorEvent, error?: any): void;
/**
* Send performance telemetry event
* @param event - Event to send
* @param error - optional error object to log
* @param logLevel - optional level of the log.
*/
sendPerformanceEvent(event: ITelemetryPerformanceEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
}
/* Excluded from this release type: Tagged */
/**
* Performance telemetry event.
* Maps to category = "performance"
*
* @deprecated For internal use within FluidFramework, use ITelemetryPerformanceEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {
duration?: number;
}
/* Excluded from this release type: TelemetryBaseEventPropertyType */
/**
* {@inheritDoc ITelemetryBaseProperties}
*
* @deprecated Renamed to {@link ITelemetryBaseProperties}
*/
export declare interface ITelemetryProperties {
[index: string]: TelemetryEventPropertyType | Tagged<TelemetryEventPropertyType>;
}
/* Excluded from this release type: TelemetryEventCategory */
/**
* Warning emitted when requests to storage are being throttled
*/
export declare interface IThrottlingWarning extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.throttlingError;
readonly retryAfterSeconds: number;
}
/* Excluded from this release type: TelemetryEventPropertyType */
/**
* Error indicating an API is being used improperly resulting in an invalid operation.
*/
export declare interface IUsageError extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.usageError;
}
/* Excluded from this release type: TransformedEvent */
/**
* Specify levels of the logs.
*/
export declare const LogLevel: {
readonly verbose: 10;
readonly default: 20;
readonly error: 30;
};
/**
* Specify a level to the log to filter out logs based on the level.
*/
export declare type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
/**
* Does the type replacement by changing types of {@link IEventThisPlaceHolder} to `TThis`
*/
export declare type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {
[K in keyof L]: L[K] extends IEventThisPlaceHolder ? TThis : L[K];
} : L;
/**
* A property to be logged to telemetry may require a tag indicating the value may contain sensitive data.
* This type wraps a value of the given type V in an object along with a string tag (type can be further specified as T).
*
* This indicates that the value should be organized or handled differently by loggers in various first or third
* party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.
*/
export declare interface Tagged<V, T extends string = string> {
value: V;
tag: T;
}
/**
* Property types that can be logged.
*
* @remarks Logging entire objects is considered extremely dangerous from a telemetry point of view because people can
* easily add fields to objects that shouldn't be logged and not realize it's going to be logged.
* General best practice is to explicitly log the fields you care about from objects.
*/
export declare type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;
/**
* Examples of known categories, however category can be any string for extensibility.
*
* @deprecated Moved to \@fluidframework/telemetry-utils package
*/
export declare type TelemetryEventCategory = "generic" | "error" | "performance";
/**
* {@inheritDoc TelemetryBaseEventPropertyType}
*
* @deprecated Renamed to {@link TelemetryBaseEventPropertyType}
*/
export declare type TelemetryEventPropertyType = string | number | boolean | undefined;
/**
* Transforms the event overload by replacing {@link IEventThisPlaceHolder} with `TThis` in the event listener
* arguments and having the overload return `TTHis` as well
*/
export declare type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
export { }

@@ -1,907 +0,107 @@

/**
* Allows an interface to extend interfaces that already extend an {@link IEventProvider}.
*
* @example
*
* ``` typescript
* interface AEvents extends IEvent{
* (event: "a-event",listener: (a: number)=>void);
* }
* interface A extends IEventProvider<AEvents>{
* a: object;
* }
*
* interface BEvents extends IEvent{
* (event: "b-event",listener: (b: string)=>void);
* }
* interface B extends ExtendEventProvider<AEvents, A, BEvents>{
* b: boolean;
* };
* ```
*
* interface B will now extend interface A and its events
*
*/
export declare type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;
/* Excluded from this release type: ExtendEventProvider */
/**
* Error types the Fluid Framework may report.
*/
export declare const FluidErrorTypes: {
/**
* Some error, most likely an exception caught by runtime and propagated to container as critical error
*/
readonly genericError: "genericError";
/**
* Throttling error from server. Server is busy and is asking not to reconnect for some time
*/
readonly throttlingError: "throttlingError";
/**
* Data loss error detected by Container / DeltaManager. Likely points to storage issue.
*/
readonly dataCorruptionError: "dataCorruptionError";
/**
* Error encountered when processing an operation. May correlate with data corruption.
*/
readonly dataProcessingError: "dataProcessingError";
/**
* Error indicating an API is being used improperly resulting in an invalid operation.
*/
readonly usageError: "usageError";
};
/* Excluded from this release type: FluidErrorTypes */
export declare type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];
/* Excluded from this release type: FluidObject */
/**
* This utility type take interface(s) that follow the FluidObject pattern, and produces
* a new type that can be used for inspection and discovery of those interfaces.
*
* It is meant to be used with types that are known to implement the FluidObject pattern.
* A common way to specify a type implements the FluidObject pattern is to expose it as a
* FluidObject without a generic argument.
*
* @example
*
* For example, if we have an interface like the following:
*
* ```typescript
* interface IProvideFoo{
* IFoo: IFoo
* }
* interface IFoo extends IProvideFoo{
* foobar();
* }
* ```
*
* and a function that returns a FluidObject. You would do the following
*
* `const maybeFoo: FluidObject<IFoo> = getFluidObject()`;
*
* Either IFoo or IProvideFoo are valid generic arguments. In both case
* maybeFoo will be of type `{IFoo?: IFoo}`. If IFoo is not undefined,
* then the FluidObject provides IFoo, and it can be used.
*
* You can inspect multiple types via a intersection. For example:
* `FluidObject<IFoo & IBar>`
*
*/
export declare type FluidObject<T = unknown> = {
[P in FluidObjectProviderKeys<T>]?: T[P];
};
/* Excluded from this release type: FluidObjectKeys */
/**
* This utility type creates a type that is the union of all keys on the generic type
* which implement the FluidObject pattern.
*
* See {@link FluidObject}
*
* For example `FluidObjectKeys<IFoo & IBar>` would result in `"IFoo" | "IBar"`
*
*/
export declare type FluidObjectKeys<T> = keyof FluidObject<T>;
/* Excluded from this release type: FluidObjectProviderKeys */
/**
* Produces a valid FluidObject key given a type and a property.
*
* @remarks
*
* A valid FluidObject key is a property that exists on the incoming type
* as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`
* This aligns with the FluidObject pattern expected to be used with all FluidObjects.
*
* This utility type is meant for internal use by {@link FluidObject}
*
* @example
*
* ```typescript
* interface IProvideFoo{
* IFoo: IFoo
* }
* interface IFoo extends IProvideFoo{
* foobar();
* }
* ```
*
* This pattern enables discovery, and delegation in a standard way which is central
* to FluidObject pattern.
*/
export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
/* Excluded from this release type: IDisposable */
/**
* Base interface for objects that require lifetime management via explicit disposal.
*/
export declare interface IDisposable {
/**
* Whether or not the object has been disposed.
* If true, the object should be considered invalid, and its other state should be disregarded.
*/
readonly disposed: boolean;
/**
* Dispose of the object and its resources.
* @param error - Optional error indicating the reason for the disposal, if the object was
* disposed as the result of an error.
*/
dispose(error?: Error): void;
}
/* Excluded from this release type: IErrorBase */
/**
* Base interface for all errors and warnings emitted the container.
*
* @remarks
*
* We are in the process of unifying error types across layers of the Framework. For now we have only migrated
* those from container-definitions. Once fully migrated, this will be a base interface for all errors and
* warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.
* Runtime and others will follow soon.
*/
export declare interface IErrorBase extends Partial<Error> {
/**
* A type tag differentiating kinds of errors emitted by the container.
*
* @see See {@link FluidErrorTypes#genericError} for some common examples.
* - container
* - runtime
* - drivers
*/
readonly errorType: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}
*
* @remarks
*
* Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)
* If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result
* of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.
*/
readonly message: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}
*/
readonly name?: string;
/**
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}
*/
readonly stack?: string;
/**
* Returns all properties of this error object that are fit for logging.
* Some may be tagged to indicate they contain some kind of sensitive data.
*/
getTelemetryProperties?(): ITelemetryBaseProperties;
}
/* Excluded from this release type: IErrorEvent */
/**
* Base interface for error event emitters.
*/
export declare interface IErrorEvent extends IEvent {
/**
* Base error event emitter signature.
*
* @eventProperty
*/
(event: "error", listener: (message: any) => void): any;
}
/* Excluded from this release type: IEvent */
/**
* Base interface for event emitters.
*/
export declare interface IEvent {
/**
* Base event emitter signature.
*
* @remarks The event emitter polyfill and the node event emitter have different event types:
* `string | symbol` vs. `string | number`.
*
* So for our typing we'll contrain to string, that way we work with both.
*
* @eventProperty
*/
(event: string, listener: (...args: any[]) => void): any;
}
/* Excluded from this release type: IEventProvider */
/**
* Base interface for event providers.
*/
export declare interface IEventProvider<TEvent extends IEvent> {
/**
* Registers a callback to be invoked when the corresponding event is triggered.
*/
readonly on: IEventTransformer<this, TEvent>;
/**
* Registers a callback to be invoked the first time (after registration) the corresponding event is triggered.
*/
readonly once: IEventTransformer<this, TEvent>;
/**
* Removes the corresponding event if it has been registered.
*/
readonly off: IEventTransformer<this, TEvent>;
}
/* Excluded from this release type: IEventThisPlaceHolder */
/**
* The placeholder type that should be used instead of `this` in events.
*/
export declare type IEventThisPlaceHolder = {
thisPlaceHolder: "thisPlaceHolder";
};
/* Excluded from this release type: IEventTransformer */
/**
* This type is a conditional type for transforming all the overloads provided in `TEvent`.
*
* @remarks
* Due to limitations of the TypeScript typing system, we need to handle each number of overload individually.
* It currently supports the max of 15 event overloads which is more than we use anywhere.
* At more than 15 overloads we start to hit {@link https://github.com/microsoft/TypeScript/issues/37209 | TS2589}.
* If we need to move beyond 15 we should evaluate using a mapped type pattern like `{"event":(listenerArgs)=>void}`
*/
export declare type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: infer E13, listener: (...args: infer A13) => void): any;
(event: infer E14, listener: (...args: infer A14) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> & TransformedEvent<TThis, E13, A13> & TransformedEvent<TThis, E14, A14> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: infer E13, listener: (...args: infer A13) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> & TransformedEvent<TThis, E13, A13> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: infer E12, listener: (...args: infer A12) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: infer E11, listener: (...args: infer A11) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: infer E10, listener: (...args: infer A10) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: infer E9, listener: (...args: infer A9) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: infer E8, listener: (...args: infer A8) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: infer E7, listener: (...args: infer A7) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: infer E6, listener: (...args: infer A6) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: infer E5, listener: (...args: infer A5) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: infer E4, listener: (...args: infer A4) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: infer E3, listener: (...args: infer A3) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: infer E2, listener: (...args: infer A2) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: infer E1, listener: (...args: infer A1) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> : TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;
(event: string, listener: (...args: any[]) => void): any;
} ? TransformedEvent<TThis, E0, A0> : TransformedEvent<TThis, string, any[]>;
/* Excluded from this release type: IFluidCodeDetails */
/**
* Data structure used to describe the code to load on the Fluid document.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetails}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetails {
/**
* The code package to be used on the Fluid document. This is either the package name which will be loaded
* from a package manager. Or the expanded Fluid package.
*/
readonly package: string | Readonly<IFluidPackage>;
/**
* Configuration details. This includes links to the package manager and base CDNs.
*/
readonly config?: IFluidCodeDetailsConfig;
}
/* Excluded from this release type: IFluidCodeDetailsComparer */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
/* Excluded from this release type: IFluidCodeDetailsConfig */
/**
* Provides capability to compare Fluid code details.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
/**
* Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.
*
* Similar semantics to:
* {@link https://github.com/npm/node-semver#usage}
*/
satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
/**
* Returns a number representing the ascending sort order of the `a` and `b` code details:
*
* - `< 0` if `a < b`.
*
* - `= 0` if `a === b`.
*
* - `> 0` if `a > b`.
*
* - `undefined` if `a` is not comparable to `b`.
*
* Similar semantics to:
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description | Array.sort}
*/
compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
}
/* Excluded from this release type: IFluidHandle */
/**
* Package manager configuration. Provides a key value mapping of config values.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsConfig}
* to have code loading modules in same package.
*/
export declare interface IFluidCodeDetailsConfig {
readonly [key: string]: string;
}
/* Excluded from this release type: IFluidHandleContext */
export declare const IFluidHandle: keyof IProvideFluidHandle;
/* Excluded from this release type: IFluidLoadable */
/**
* Handle to a shared {@link FluidObject}.
*/
export declare interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvideFluidHandle {
/**
* @deprecated Do not use handle's path for routing. Use `get` to get the underlying object.
*
* The absolute path to the handle context from the root.
*/
readonly absolutePath: string;
/**
* Flag indicating whether or not the entity has services attached.
*/
readonly isAttached: boolean;
/**
* @deprecated To be removed. This is part of an internal API surface and should not be called.
*
* Runs through the graph and attach the bounded handles.
*/
attachGraph(): void;
/**
* Returns a promise to the Fluid Object referenced by the handle.
*/
get(): Promise<T>;
/**
* @deprecated To be removed. This is part of an internal API surface and should not be called.
*
* Binds the given handle to this one or attach the given handle if this handle is attached.
* A bound handle will also be attached once this handle is attached.
*/
bind(handle: IFluidHandle): void;
}
/* Excluded from this release type: IFluidPackage */
export declare const IFluidHandleContext: keyof IProvideFluidHandleContext;
/* Excluded from this release type: IFluidPackageEnvironment */
/**
* Describes a routing context from which other `IFluidHandleContext`s are defined.
*/
export declare interface IFluidHandleContext extends IProvideFluidHandleContext {
/**
* The absolute path to the handle context from the root.
*/
readonly absolutePath: string;
/**
* The parent IFluidHandleContext that has provided a route path to this IFluidHandleContext or undefined
* at the root.
*/
readonly routeContext?: IFluidHandleContext;
/**
* Flag indicating whether or not the entity has services attached.
*/
readonly isAttached: boolean;
/**
* Runs through the graph and attach the bounded handles.
*/
attachGraph(): void;
resolveHandle(request: IRequest): Promise<IResponse>;
}
/* Excluded from this release type: IFluidRouter */
export declare const IFluidLoadable: keyof IProvideFluidLoadable;
/* Excluded from this release type: IFluidRunnable */
/**
* A shared FluidObject has a URL from which it can be referenced
*/
export declare interface IFluidLoadable extends IProvideFluidLoadable {
handle: IFluidHandle;
}
/* Excluded from this release type: IGenericError */
/**
* Fluid-specific properties expected on a package to be loaded by the code loader.
* While compatible with the npm package format it is not necessary that that package is an
* npm package:
* {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}
*
* @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackage}
* to have code loading modules in same package.
*/
export declare interface IFluidPackage {
/**
* The name of the package that this code represnets
*/
name: string;
/**
* This object represents the Fluid specific properties of the package
*/
fluid: {
/**
* The name of the of the environment. This should be something like browser, or node
* and contain the necessary targets for loading this code in that environment.
*/
[environment: string]: undefined | IFluidPackageEnvironment;
};
/**
* General access for extended fields as specific usages will
* likely have additional infornamation like a definition of
* compatible versions, or deployment information like rings or rollouts.
*/
[key: string]: unknown;
}
/* Excluded from this release type: ILoggingError */
/**
* Specifies an environment on Fluid property of an {@link IFluidPackage}.
*
* @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackageEnvironment}
* to have code loading modules in same package.
*/
export declare interface IFluidPackageEnvironment {
/**
* The name of the target. For a browser environment, this could be umd for scripts
* or css for styles.
*/
[target: string]: undefined | {
/**
* List of files for the target. These can be relative or absolute.
* The code loader should resolve relative paths, and validate all
* full urls.
*/
files: string[];
/**
* General access for extended fields as specific usages will
* likely have additional infornamation like a definition
* of Library, the entrypoint for umd packages
*/
[key: string]: unknown;
};
}
/* Excluded from this release type: IProvideFluidCodeDetailsComparer */
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare const IFluidRouter: keyof IProvideFluidRouter;
/* Excluded from this release type: IProvideFluidHandle */
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare interface IFluidRouter extends IProvideFluidRouter {
request(request: IRequest): Promise<IResponse>;
}
/* Excluded from this release type: IProvideFluidHandleContext */
export declare const IFluidRunnable: keyof IProvideFluidRunnable;
/* Excluded from this release type: IProvideFluidLoadable */
export declare interface IFluidRunnable {
run(...args: any[]): Promise<void>;
stop(reason?: string): void;
}
/* Excluded from this release type: IProvideFluidRouter */
/**
* Generic wrapper for an unrecognized/uncategorized error object
*/
export declare interface IGenericError extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.genericError;
error?: any;
}
/* Excluded from this release type: IProvideFluidRunnable */
/**
* An error object that supports exporting its properties to be logged to telemetry
*/
export declare interface ILoggingError extends Error {
/**
* Return all properties from this object that should be logged to telemetry
*/
getTelemetryProperties(): ITelemetryBaseProperties;
}
/* Excluded from this release type: IRequest */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#IProvideFluidCodeDetailsComparer}
* to have code loading modules in same package.
*/
export declare interface IProvideFluidCodeDetailsComparer {
readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
}
/* Excluded from this release type: IRequestHeader */
export declare interface IProvideFluidHandle {
readonly IFluidHandle: IFluidHandle;
}
/* Excluded from this release type: IResponse */
export declare interface IProvideFluidHandleContext {
readonly IFluidHandleContext: IFluidHandleContext;
}
/* Excluded from this release type: isFluidCodeDetails */
export declare interface IProvideFluidLoadable {
readonly IFluidLoadable: IFluidLoadable;
}
/* Excluded from this release type: isFluidPackage */
/**
* Request routing
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare interface IProvideFluidRouter {
readonly IFluidRouter: IFluidRouter;
}
/* Excluded from this release type: ITaggedTelemetryPropertyType */
export declare interface IProvideFluidRunnable {
readonly IFluidRunnable: IFluidRunnable;
}
/* Excluded from this release type: ITelemetryBaseEvent */
export declare interface IRequest {
url: string;
headers?: IRequestHeader;
}
/* Excluded from this release type: ITelemetryBaseLogger */
export declare interface IRequestHeader {
[index: string]: any;
}
/* Excluded from this release type: ITelemetryBaseProperties */
export declare interface IResponse {
mimeType: string;
status: number;
value: any;
headers?: {
[key: string]: any;
};
stack?: string;
}
/* Excluded from this release type: ITelemetryErrorEvent */
/**
* @deprecated in favor of {@link @fluidframework/container-definitions#isFluidCodeDetails}
* to have code loading modules in same package.
*/
export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
/* Excluded from this release type: ITelemetryGenericEvent */
/**
* Check if the package.json defines a Fluid package.
*
* @deprecated in favor of {@link @fluidframework/container-definitions#isFluidPackage}
* to have code loading modules in same package.
*
* @param pkg - The package json data to check if it is a Fluid package.
*/
export declare const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;
/* Excluded from this release type: ITelemetryLogger */
/**
* @see {@link Tagged} for info on tagging
*
* @deprecated Use Tagged\<TelemetryBaseEventPropertyType\>
*/
export declare interface ITaggedTelemetryPropertyType {
value: TelemetryEventPropertyType;
tag: string;
}
/* Excluded from this release type: ITelemetryPerformanceEvent */
/**
* Base interface for logging telemetry statements.
* Can contain any number of properties that get serialized as json payload.
* @param category - category of the event, like "error", "performance", "generic", etc.
* @param eventName - name of the event.
*/
export declare interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
category: string;
eventName: string;
}
/* Excluded from this release type: ITelemetryProperties */
/**
* Interface to output telemetry events.
* Implemented by hosting app / loader
*/
export declare interface ITelemetryBaseLogger {
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
minLogLevel?: LogLevel;
}
/* Excluded from this release type: IThrottlingWarning */
/**
* JSON-serializable properties, which will be logged with telemetry.
*/
export declare type ITelemetryBaseProperties = ITelemetryProperties;
/* Excluded from this release type: IUsageError */
/**
* Error telemetry event.
* Maps to category = "error"
*
* @deprecated For internal use within FluidFramework, use ITelemetryErrorEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryErrorEvent extends ITelemetryProperties {
eventName: string;
}
/* Excluded from this release type: LogLevel */
/**
* Informational (non-error) telemetry event
* Maps to category = "generic"
*
* @deprecated For internal use within FluidFramework, use ITelemetryGenericEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryGenericEvent extends ITelemetryProperties {
eventName: string;
category?: TelemetryEventCategory;
}
/* Excluded from this release type: ReplaceIEventThisPlaceHolder */
/**
* ITelemetryLogger interface contains various helper telemetry methods,
* encoding in one place schemas for various types of Fluid telemetry events.
* Creates sub-logger that appends properties to all events
*
* @deprecated For internal use within FluidFramework, use ITelemetryLoggerExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryLogger extends ITelemetryBaseLogger {
/**
* Actual implementation that sends telemetry event
* Implemented by derived classes
* @param event - Telemetry event to send over
* @param logLevel - optional level of the log.
*/
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
/**
* Send information telemetry event
* @param event - Event to send
* @param error - optional error object to log
* @param logLevel - optional level of the log.
*/
sendTelemetryEvent(event: ITelemetryGenericEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
/**
* Send error telemetry event
* @param event - Event to send
* @param error - optional error object to log
*/
sendErrorEvent(event: ITelemetryErrorEvent, error?: any): void;
/**
* Send performance telemetry event
* @param event - Event to send
* @param error - optional error object to log
* @param logLevel - optional level of the log.
*/
sendPerformanceEvent(event: ITelemetryPerformanceEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
}
/* Excluded from this release type: Tagged */
/**
* Performance telemetry event.
* Maps to category = "performance"
*
* @deprecated For internal use within FluidFramework, use ITelemetryPerformanceEventExt in \@fluidframework/telemetry-utils.
* No replacement intended for FluidFramework consumers.
*/
export declare interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {
duration?: number;
}
/* Excluded from this release type: TelemetryBaseEventPropertyType */
/**
* {@inheritDoc ITelemetryBaseProperties}
*
* @deprecated Renamed to {@link ITelemetryBaseProperties}
*/
export declare interface ITelemetryProperties {
[index: string]: TelemetryEventPropertyType | Tagged<TelemetryEventPropertyType>;
}
/* Excluded from this release type: TelemetryEventCategory */
/**
* Warning emitted when requests to storage are being throttled
*/
export declare interface IThrottlingWarning extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.throttlingError;
readonly retryAfterSeconds: number;
}
/* Excluded from this release type: TelemetryEventPropertyType */
/**
* Error indicating an API is being used improperly resulting in an invalid operation.
*/
export declare interface IUsageError extends IErrorBase {
/**
* {@inheritDoc IErrorBase.errorType}
*/
readonly errorType: typeof FluidErrorTypes.usageError;
}
/* Excluded from this release type: TransformedEvent */
/**
* Specify levels of the logs.
*/
export declare const LogLevel: {
readonly verbose: 10;
readonly default: 20;
readonly error: 30;
};
/**
* Specify a level to the log to filter out logs based on the level.
*/
export declare type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
/**
* Does the type replacement by changing types of {@link IEventThisPlaceHolder} to `TThis`
*/
export declare type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {
[K in keyof L]: L[K] extends IEventThisPlaceHolder ? TThis : L[K];
} : L;
/**
* A property to be logged to telemetry may require a tag indicating the value may contain sensitive data.
* This type wraps a value of the given type V in an object along with a string tag (type can be further specified as T).
*
* This indicates that the value should be organized or handled differently by loggers in various first or third
* party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.
*/
export declare interface Tagged<V, T extends string = string> {
value: V;
tag: T;
}
/**
* Property types that can be logged.
*
* @remarks Logging entire objects is considered extremely dangerous from a telemetry point of view because people can
* easily add fields to objects that shouldn't be logged and not realize it's going to be logged.
* General best practice is to explicitly log the fields you care about from objects.
*/
export declare type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;
/**
* Examples of known categories, however category can be any string for extensibility.
*
* @deprecated Moved to \@fluidframework/telemetry-utils package
*/
export declare type TelemetryEventCategory = "generic" | "error" | "performance";
/**
* {@inheritDoc TelemetryBaseEventPropertyType}
*
* @deprecated Renamed to {@link TelemetryBaseEventPropertyType}
*/
export declare type TelemetryEventPropertyType = string | number | boolean | undefined;
/**
* Transforms the event overload by replacing {@link IEventThisPlaceHolder} with `TThis` in the event listener
* arguments and having the overload return `TTHis` as well
*/
export declare type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
export { }

@@ -23,3 +23,3 @@ /**

* interface B will now extend interface A and its events
*
* @internal
*/

@@ -30,2 +30,3 @@ export declare type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;

* Error types the Fluid Framework may report.
* @internal
*/

@@ -55,2 +56,5 @@ export declare const FluidErrorTypes: {

/**
* @internal
*/
export declare type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];

@@ -89,3 +93,3 @@

* `FluidObject<IFoo & IBar>`
*
* @internal
*/

@@ -103,3 +107,3 @@ export declare type FluidObject<T = unknown> = {

* For example `FluidObjectKeys<IFoo & IBar>` would result in `"IFoo" | "IBar"`
*
* @internal
*/

@@ -132,2 +136,3 @@ export declare type FluidObjectKeys<T> = keyof FluidObject<T>;

* to FluidObject pattern.
* @internal
*/

@@ -138,2 +143,3 @@ export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;

* Base interface for objects that require lifetime management via explicit disposal.
* @internal
*/

@@ -163,2 +169,3 @@ export declare interface IDisposable {

* Runtime and others will follow soon.
* @internal
*/

@@ -202,2 +209,3 @@ export declare interface IErrorBase extends Partial<Error> {

* Base interface for error event emitters.
* @internal
*/

@@ -215,2 +223,3 @@ export declare interface IErrorEvent extends IEvent {

* Base interface for event emitters.
* @internal
*/

@@ -233,2 +242,3 @@ export declare interface IEvent {

* Base interface for event providers.
* @internal
*/

@@ -252,2 +262,3 @@ export declare interface IEventProvider<TEvent extends IEvent> {

* The placeholder type that should be used instead of `this` in events.
* @internal
*/

@@ -266,2 +277,3 @@ export declare type IEventThisPlaceHolder = {

* If we need to move beyond 15 we should evaluate using a mapped type pattern like `{"event":(listenerArgs)=>void}`
* @internal
*/

@@ -425,2 +437,3 @@ export declare type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {

* to have code loading modules in same package.
* @internal
*/

@@ -442,2 +455,3 @@ export declare interface IFluidCodeDetails {

* to have code loading modules in same package.
* @internal
*/

@@ -451,2 +465,3 @@ export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;

* to have code loading modules in same package.
* @internal
*/

@@ -483,2 +498,3 @@ export declare interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {

* to have code loading modules in same package.
* @internal
*/

@@ -489,2 +505,5 @@ export declare interface IFluidCodeDetailsConfig {

/**
* @internal
*/
export declare const IFluidHandle: keyof IProvideFluidHandle;

@@ -494,2 +513,3 @@

* Handle to a shared {@link FluidObject}.
* @internal
*/

@@ -526,2 +546,5 @@ export declare interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvideFluidHandle {

/**
* @internal
*/
export declare const IFluidHandleContext: keyof IProvideFluidHandleContext;

@@ -531,2 +554,3 @@

* Describes a routing context from which other `IFluidHandleContext`s are defined.
* @internal
*/

@@ -554,2 +578,5 @@ export declare interface IFluidHandleContext extends IProvideFluidHandleContext {

/**
* @internal
*/
export declare const IFluidLoadable: keyof IProvideFluidLoadable;

@@ -559,2 +586,3 @@

* A shared FluidObject has a URL from which it can be referenced
* @internal
*/

@@ -573,2 +601,3 @@ export declare interface IFluidLoadable extends IProvideFluidLoadable {

* to have code loading modules in same package.
* @internal
*/

@@ -603,2 +632,3 @@ export declare interface IFluidPackage {

* to have code loading modules in same package.
* @internal
*/

@@ -628,2 +658,3 @@ export declare interface IFluidPackageEnvironment {

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/

@@ -634,2 +665,3 @@ export declare const IFluidRouter: keyof IProvideFluidRouter;

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/

@@ -640,4 +672,10 @@ export declare interface IFluidRouter extends IProvideFluidRouter {

/**
* @internal
*/
export declare const IFluidRunnable: keyof IProvideFluidRunnable;
/**
* @internal
*/
export declare interface IFluidRunnable {

@@ -650,2 +688,3 @@ run(...args: any[]): Promise<void>;

* Generic wrapper for an unrecognized/uncategorized error object
* @internal
*/

@@ -662,2 +701,3 @@ export declare interface IGenericError extends IErrorBase {

* An error object that supports exporting its properties to be logged to telemetry
* @internal
*/

@@ -674,2 +714,3 @@ export declare interface ILoggingError extends Error {

* to have code loading modules in same package.
* @internal
*/

@@ -680,2 +721,5 @@ export declare interface IProvideFluidCodeDetailsComparer {

/**
* @internal
*/
export declare interface IProvideFluidHandle {

@@ -685,2 +729,5 @@ readonly IFluidHandle: IFluidHandle;

/**
* @internal
*/
export declare interface IProvideFluidHandleContext {

@@ -690,2 +737,5 @@ readonly IFluidHandleContext: IFluidHandleContext;

/**
* @internal
*/
export declare interface IProvideFluidLoadable {

@@ -698,2 +748,3 @@ readonly IFluidLoadable: IFluidLoadable;

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/

@@ -704,2 +755,5 @@ export declare interface IProvideFluidRouter {

/**
* @internal
*/
export declare interface IProvideFluidRunnable {

@@ -709,2 +763,5 @@ readonly IFluidRunnable: IFluidRunnable;

/**
* @internal
*/
export declare interface IRequest {

@@ -715,2 +772,5 @@ url: string;

/**
* @internal
*/
export declare interface IRequestHeader {

@@ -720,2 +780,5 @@ [index: string]: any;

/**
* @internal
*/
export declare interface IResponse {

@@ -734,2 +797,3 @@ mimeType: string;

* to have code loading modules in same package.
* @internal
*/

@@ -745,2 +809,3 @@ export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;

* @param pkg - The package json data to check if it is a Fluid package.
* @internal
*/

@@ -753,2 +818,3 @@ export declare const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;

* @deprecated Use Tagged\<TelemetryBaseEventPropertyType\>
* @internal
*/

@@ -765,2 +831,3 @@ export declare interface ITaggedTelemetryPropertyType {

* @param eventName - name of the event.
* @internal
*/

@@ -775,2 +842,3 @@ export declare interface ITelemetryBaseEvent extends ITelemetryBaseProperties {

* Implemented by hosting app / loader
* @internal
*/

@@ -784,2 +852,3 @@ export declare interface ITelemetryBaseLogger {

* JSON-serializable properties, which will be logged with telemetry.
* @internal
*/

@@ -794,2 +863,3 @@ export declare type ITelemetryBaseProperties = ITelemetryProperties;

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -806,2 +876,3 @@ export declare interface ITelemetryErrorEvent extends ITelemetryProperties {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -820,2 +891,3 @@ export declare interface ITelemetryGenericEvent extends ITelemetryProperties {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -858,2 +930,3 @@ export declare interface ITelemetryLogger extends ITelemetryBaseLogger {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -868,2 +941,3 @@ export declare interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {

* @deprecated Renamed to {@link ITelemetryBaseProperties}
* @internal
*/

@@ -876,2 +950,3 @@ export declare interface ITelemetryProperties {

* Warning emitted when requests to storage are being throttled
* @internal
*/

@@ -888,2 +963,3 @@ export declare interface IThrottlingWarning extends IErrorBase {

* Error indicating an API is being used improperly resulting in an invalid operation.
* @internal
*/

@@ -899,2 +975,3 @@ export declare interface IUsageError extends IErrorBase {

* Specify levels of the logs.
* @internal
*/

@@ -909,2 +986,3 @@ export declare const LogLevel: {

* Specify a level to the log to filter out logs based on the level.
* @internal
*/

@@ -915,2 +993,3 @@ export declare type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];

* Does the type replacement by changing types of {@link IEventThisPlaceHolder} to `TThis`
* @internal
*/

@@ -927,2 +1006,3 @@ export declare type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {

* party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.
* @internal
*/

@@ -940,2 +1020,3 @@ export declare interface Tagged<V, T extends string = string> {

* General best practice is to explicitly log the fields you care about from objects.
* @internal
*/

@@ -948,2 +1029,3 @@ export declare type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;

* @deprecated Moved to \@fluidframework/telemetry-utils package
* @internal
*/

@@ -956,2 +1038,3 @@ export declare type TelemetryEventCategory = "generic" | "error" | "performance";

* @deprecated Renamed to {@link TelemetryBaseEventPropertyType}
* @internal
*/

@@ -963,2 +1046,3 @@ export declare type TelemetryEventPropertyType = string | number | boolean | undefined;

* arguments and having the overload return `TTHis` as well
* @internal
*/

@@ -965,0 +1049,0 @@ export declare type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;

@@ -7,2 +7,3 @@ /*!

* Base interface for objects that require lifetime management via explicit disposal.
* @internal
*/

@@ -9,0 +10,0 @@ export interface IDisposable {

@@ -8,2 +8,3 @@ /*!

* Error types the Fluid Framework may report.
* @internal
*/

@@ -32,2 +33,5 @@ export declare const FluidErrorTypes: {

};
/**
* @internal
*/
export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];

@@ -43,2 +47,3 @@ /**

* Runtime and others will follow soon.
* @internal
*/

@@ -81,2 +86,3 @@ export interface IErrorBase extends Partial<Error> {

* Generic wrapper for an unrecognized/uncategorized error object
* @internal
*/

@@ -92,2 +98,3 @@ export interface IGenericError extends IErrorBase {

* Error indicating an API is being used improperly resulting in an invalid operation.
* @internal
*/

@@ -102,2 +109,3 @@ export interface IUsageError extends IErrorBase {

* Warning emitted when requests to storage are being throttled
* @internal
*/

@@ -104,0 +112,0 @@ export interface IThrottlingWarning extends IErrorBase {

@@ -7,2 +7,3 @@ /*!

* Error types the Fluid Framework may report.
* @internal
*/

@@ -9,0 +10,0 @@ export const FluidErrorTypes = {

@@ -7,2 +7,3 @@ /*!

* Base interface for event emitters.
* @internal
*/

@@ -24,2 +25,3 @@ export interface IEvent {

* Base interface for error event emitters.
* @internal
*/

@@ -36,2 +38,3 @@ export interface IErrorEvent extends IEvent {

* Base interface for event providers.
* @internal
*/

@@ -74,3 +77,3 @@ export interface IEventProvider<TEvent extends IEvent> {

* interface B will now extend interface A and its events
*
* @internal
*/

@@ -80,2 +83,3 @@ export type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;

* The placeholder type that should be used instead of `this` in events.
* @internal
*/

@@ -87,2 +91,3 @@ export type IEventThisPlaceHolder = {

* Does the type replacement by changing types of {@link IEventThisPlaceHolder} to `TThis`
* @internal
*/

@@ -95,2 +100,3 @@ export type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {

* arguments and having the overload return `TTHis` as well
* @internal
*/

@@ -106,2 +112,3 @@ export type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;

* If we need to move beyond 15 we should evaluate using a mapped type pattern like `{"event":(listenerArgs)=>void}`
* @internal
*/

@@ -108,0 +115,0 @@ export type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {

@@ -6,3 +6,9 @@ /*!

import { IFluidHandle } from "./handles";
/**
* @internal
*/
export declare const IFluidLoadable: keyof IProvideFluidLoadable;
/**
* @internal
*/
export interface IProvideFluidLoadable {

@@ -13,2 +19,3 @@ readonly IFluidLoadable: IFluidLoadable;

* A shared FluidObject has a URL from which it can be referenced
* @internal
*/

@@ -18,6 +25,15 @@ export interface IFluidLoadable extends IProvideFluidLoadable {

}
/**
* @internal
*/
export declare const IFluidRunnable: keyof IProvideFluidRunnable;
/**
* @internal
*/
export interface IProvideFluidRunnable {
readonly IFluidRunnable: IFluidRunnable;
}
/**
* @internal
*/
export interface IFluidRunnable {

@@ -24,0 +40,0 @@ run(...args: any[]): Promise<void>;

@@ -5,4 +5,10 @@ /*!

*/
/**
* @internal
*/
export const IFluidLoadable = "IFluidLoadable";
/**
* @internal
*/
export const IFluidRunnable = "IFluidRunnable";
//# sourceMappingURL=fluidLoadable.js.map

@@ -10,2 +10,3 @@ /*!

* to have code loading modules in same package.
* @internal
*/

@@ -40,2 +41,3 @@ export interface IFluidPackageEnvironment {

* to have code loading modules in same package.
* @internal
*/

@@ -71,2 +73,3 @@ export interface IFluidPackage {

* @param pkg - The package json data to check if it is a Fluid package.
* @internal
*/

@@ -79,2 +82,3 @@ export declare const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;

* to have code loading modules in same package.
* @internal
*/

@@ -89,2 +93,3 @@ export interface IFluidCodeDetailsConfig {

* to have code loading modules in same package.
* @internal
*/

@@ -105,2 +110,3 @@ export interface IFluidCodeDetails {

* to have code loading modules in same package.
* @internal
*/

@@ -111,2 +117,3 @@ export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;

* to have code loading modules in same package.
* @internal
*/

@@ -117,2 +124,3 @@ export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;

* to have code loading modules in same package.
* @internal
*/

@@ -127,2 +135,3 @@ export interface IProvideFluidCodeDetailsComparer {

* to have code loading modules in same package.
* @internal
*/

@@ -129,0 +138,0 @@ export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {

@@ -12,2 +12,3 @@ /*!

* @param pkg - The package json data to check if it is a Fluid package.
* @internal
*/

@@ -21,2 +22,3 @@ export const isFluidPackage = (pkg) => typeof pkg === "object" &&

* to have code loading modules in same package.
* @internal
*/

@@ -33,4 +35,5 @@ export const isFluidCodeDetails = (details) => {

* to have code loading modules in same package.
* @internal
*/
export const IFluidCodeDetailsComparer = "IFluidCodeDetailsComparer";
//# sourceMappingURL=fluidPackage.js.map

@@ -5,5 +5,11 @@ /*!

*/
/**
* @internal
*/
export interface IRequestHeader {
[index: string]: any;
}
/**
* @internal
*/
export interface IRequest {

@@ -13,2 +19,5 @@ url: string;

}
/**
* @internal
*/
export interface IResponse {

@@ -25,2 +34,3 @@ mimeType: string;

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/

@@ -31,2 +41,3 @@ export declare const IFluidRouter: keyof IProvideFluidRouter;

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/

@@ -38,2 +49,3 @@ export interface IProvideFluidRouter {

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/

@@ -40,0 +52,0 @@ export interface IFluidRouter extends IProvideFluidRouter {

@@ -7,4 +7,5 @@ /*!

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/
export const IFluidRouter = "IFluidRouter";
//# sourceMappingURL=fluidRouter.js.map

@@ -8,3 +8,9 @@ /*!

import { FluidObject } from "./provider";
/**
* @internal
*/
export declare const IFluidHandleContext: keyof IProvideFluidHandleContext;
/**
* @internal
*/
export interface IProvideFluidHandleContext {

@@ -15,2 +21,3 @@ readonly IFluidHandleContext: IFluidHandleContext;

* Describes a routing context from which other `IFluidHandleContext`s are defined.
* @internal
*/

@@ -37,3 +44,9 @@ export interface IFluidHandleContext extends IProvideFluidHandleContext {

}
/**
* @internal
*/
export declare const IFluidHandle: keyof IProvideFluidHandle;
/**
* @internal
*/
export interface IProvideFluidHandle {

@@ -44,2 +57,3 @@ readonly IFluidHandle: IFluidHandle;

* Handle to a shared {@link FluidObject}.
* @internal
*/

@@ -46,0 +60,0 @@ export interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvideFluidHandle {

@@ -5,4 +5,10 @@ /*!

*/
/**
* @internal
*/
export const IFluidHandleContext = "IFluidHandleContext";
/**
* @internal
*/
export const IFluidHandle = "IFluidHandle";
//# sourceMappingURL=handles.js.map

@@ -9,2 +9,3 @@ /*!

* @deprecated Moved to \@fluidframework/telemetry-utils package
* @internal
*/

@@ -18,2 +19,3 @@ export type TelemetryEventCategory = "generic" | "error" | "performance";

* General best practice is to explicitly log the fields you care about from objects.
* @internal
*/

@@ -25,2 +27,3 @@ export type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;

* @deprecated Renamed to {@link TelemetryBaseEventPropertyType}
* @internal
*/

@@ -34,2 +37,3 @@ export type TelemetryEventPropertyType = string | number | boolean | undefined;

* party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.
* @internal
*/

@@ -44,2 +48,3 @@ export interface Tagged<V, T extends string = string> {

* @deprecated Use Tagged\<TelemetryBaseEventPropertyType\>
* @internal
*/

@@ -52,2 +57,3 @@ export interface ITaggedTelemetryPropertyType {

* JSON-serializable properties, which will be logged with telemetry.
* @internal
*/

@@ -59,2 +65,3 @@ export type ITelemetryBaseProperties = ITelemetryProperties;

* @deprecated Renamed to {@link ITelemetryBaseProperties}
* @internal
*/

@@ -69,2 +76,3 @@ export interface ITelemetryProperties {

* @param eventName - name of the event.
* @internal
*/

@@ -77,2 +85,3 @@ export interface ITelemetryBaseEvent extends ITelemetryBaseProperties {

* Specify levels of the logs.
* @internal
*/

@@ -86,2 +95,3 @@ export declare const LogLevel: {

* Specify a level to the log to filter out logs based on the level.
* @internal
*/

@@ -92,2 +102,3 @@ export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];

* Implemented by hosting app / loader
* @internal
*/

@@ -104,2 +115,3 @@ export interface ITelemetryBaseLogger {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -116,2 +128,3 @@ export interface ITelemetryGenericEvent extends ITelemetryProperties {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -127,2 +140,3 @@ export interface ITelemetryErrorEvent extends ITelemetryProperties {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -134,2 +148,3 @@ export interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {

* An error object that supports exporting its properties to be logged to telemetry
* @internal
*/

@@ -149,2 +164,3 @@ export interface ILoggingError extends Error {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -151,0 +167,0 @@ export interface ITelemetryLogger extends ITelemetryBaseLogger {

@@ -7,2 +7,3 @@ /*!

* Specify levels of the logs.
* @internal
*/

@@ -9,0 +10,0 @@ export const LogLevel = {

@@ -29,2 +29,3 @@ /*!

* to FluidObject pattern.
* @internal
*/

@@ -63,3 +64,3 @@ export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;

* `FluidObject<IFoo & IBar>`
*
* @internal
*/

@@ -76,5 +77,5 @@ export type FluidObject<T = unknown> = {

* For example `FluidObjectKeys<IFoo & IBar>` would result in `"IFoo" | "IBar"`
*
* @internal
*/
export type FluidObjectKeys<T> = keyof FluidObject<T>;
//# sourceMappingURL=provider.d.ts.map
{
"name": "@fluidframework/core-interfaces",
"version": "2.0.0-dev.7.4.0.215930",
"version": "2.0.0-dev.7.4.0.216897",
"description": "Fluid object interfaces",

@@ -55,2 +55,3 @@ "homepage": "https://fluidframework.com",

"build:test": "tsc --project ./src/test/tsconfig.json",
"check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
"ci:build": "npm run build:compile",

@@ -64,3 +65,3 @@ "ci:build:docs": "api-extractor run",

"format": "npm run prettier:fix",
"lint": "npm run prettier && npm run eslint",
"lint": "npm run prettier && npm run check:release-tags && npm run eslint",
"lint:fix": "npm run prettier:fix && npm run eslint:fix",

@@ -67,0 +68,0 @@ "prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",

@@ -8,2 +8,3 @@ /*!

* Base interface for objects that require lifetime management via explicit disposal.
* @internal
*/

@@ -10,0 +11,0 @@ export interface IDisposable {

@@ -10,2 +10,3 @@ /*!

* Error types the Fluid Framework may report.
* @internal
*/

@@ -38,2 +39,5 @@ export const FluidErrorTypes = {

} as const;
/**
* @internal
*/
export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];

@@ -50,2 +54,3 @@

* Runtime and others will follow soon.
* @internal
*/

@@ -93,2 +98,3 @@ export interface IErrorBase extends Partial<Error> {

* Generic wrapper for an unrecognized/uncategorized error object
* @internal
*/

@@ -108,2 +114,3 @@ export interface IGenericError extends IErrorBase {

* Error indicating an API is being used improperly resulting in an invalid operation.
* @internal
*/

@@ -119,2 +126,3 @@ export interface IUsageError extends IErrorBase {

* Warning emitted when requests to storage are being throttled
* @internal
*/

@@ -121,0 +129,0 @@ export interface IThrottlingWarning extends IErrorBase {

@@ -8,2 +8,3 @@ /*!

* Base interface for event emitters.
* @internal
*/

@@ -27,2 +28,3 @@ export interface IEvent {

* Base interface for error event emitters.
* @internal
*/

@@ -41,2 +43,3 @@ export interface IErrorEvent extends IEvent {

* Base interface for event providers.
* @internal
*/

@@ -82,3 +85,3 @@ export interface IEventProvider<TEvent extends IEvent> {

* interface B will now extend interface A and its events
*
* @internal
*/

@@ -105,2 +108,3 @@ export type ExtendEventProvider<

* The placeholder type that should be used instead of `this` in events.
* @internal
*/

@@ -112,2 +116,3 @@ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions

* Does the type replacement by changing types of {@link IEventThisPlaceHolder} to `TThis`
* @internal
*/

@@ -122,2 +127,3 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any

* arguments and having the overload return `TTHis` as well
* @internal
*/

@@ -138,2 +144,3 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any

* If we need to move beyond 15 we should evaluate using a mapped type pattern like `{"event":(listenerArgs)=>void}`
* @internal
*/

@@ -140,0 +147,0 @@ export type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {

@@ -8,4 +8,10 @@ /*!

/**
* @internal
*/
export const IFluidLoadable: keyof IProvideFluidLoadable = "IFluidLoadable";
/**
* @internal
*/
export interface IProvideFluidLoadable {

@@ -16,2 +22,3 @@ readonly IFluidLoadable: IFluidLoadable;

* A shared FluidObject has a URL from which it can be referenced
* @internal
*/

@@ -23,7 +30,16 @@ export interface IFluidLoadable extends IProvideFluidLoadable {

/**
* @internal
*/
export const IFluidRunnable: keyof IProvideFluidRunnable = "IFluidRunnable";
/**
* @internal
*/
export interface IProvideFluidRunnable {
readonly IFluidRunnable: IFluidRunnable;
}
/**
* @internal
*/
export interface IFluidRunnable {

@@ -30,0 +46,0 @@ // TODO: Use `unknown` instead (API-Breaking)

@@ -11,2 +11,3 @@ /*!

* to have code loading modules in same package.
* @internal
*/

@@ -45,2 +46,3 @@ export interface IFluidPackageEnvironment {

* to have code loading modules in same package.
* @internal
*/

@@ -77,2 +79,3 @@ export interface IFluidPackage {

* @param pkg - The package json data to check if it is a Fluid package.
* @internal
*/

@@ -89,2 +92,3 @@ export const isFluidPackage = (pkg: unknown): pkg is Readonly<IFluidPackage> =>

* to have code loading modules in same package.
* @internal
*/

@@ -100,2 +104,3 @@ export interface IFluidCodeDetailsConfig {

* to have code loading modules in same package.
* @internal
*/

@@ -119,2 +124,3 @@ export interface IFluidCodeDetails {

* to have code loading modules in same package.
* @internal
*/

@@ -134,2 +140,3 @@ export const isFluidCodeDetails = (details: unknown): details is Readonly<IFluidCodeDetails> => {

* to have code loading modules in same package.
* @internal
*/

@@ -142,2 +149,3 @@ export const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer =

* to have code loading modules in same package.
* @internal
*/

@@ -153,2 +161,3 @@ export interface IProvideFluidCodeDetailsComparer {

* to have code loading modules in same package.
* @internal
*/

@@ -155,0 +164,0 @@ export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {

@@ -6,2 +6,5 @@ /*!

/**
* @internal
*/
export interface IRequestHeader {

@@ -13,2 +16,5 @@ // TODO: Use `unknown` instead (API-Breaking)

/**
* @internal
*/
export interface IRequest {

@@ -19,2 +25,5 @@ url: string;

/**
* @internal
*/
export interface IResponse {

@@ -34,2 +43,3 @@ mimeType: string;

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/

@@ -41,2 +51,3 @@ export const IFluidRouter: keyof IProvideFluidRouter = "IFluidRouter";

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/

@@ -49,2 +60,3 @@ export interface IProvideFluidRouter {

* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
* @internal
*/

@@ -51,0 +63,0 @@ export interface IFluidRouter extends IProvideFluidRouter {

@@ -10,4 +10,10 @@ /*!

/**
* @internal
*/
export const IFluidHandleContext: keyof IProvideFluidHandleContext = "IFluidHandleContext";
/**
* @internal
*/
export interface IProvideFluidHandleContext {

@@ -19,2 +25,3 @@ readonly IFluidHandleContext: IFluidHandleContext;

* Describes a routing context from which other `IFluidHandleContext`s are defined.
* @internal
*/

@@ -46,4 +53,10 @@ export interface IFluidHandleContext extends IProvideFluidHandleContext {

/**
* @internal
*/
export const IFluidHandle: keyof IProvideFluidHandle = "IFluidHandle";
/**
* @internal
*/
export interface IProvideFluidHandle {

@@ -55,2 +68,3 @@ readonly IFluidHandle: IFluidHandle;

* Handle to a shared {@link FluidObject}.
* @internal
*/

@@ -57,0 +71,0 @@ export interface IFluidHandle<

@@ -10,2 +10,3 @@ /*!

* @deprecated Moved to \@fluidframework/telemetry-utils package
* @internal
*/

@@ -20,2 +21,3 @@ export type TelemetryEventCategory = "generic" | "error" | "performance";

* General best practice is to explicitly log the fields you care about from objects.
* @internal
*/

@@ -28,2 +30,3 @@ export type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;

* @deprecated Renamed to {@link TelemetryBaseEventPropertyType}
* @internal
*/

@@ -38,2 +41,3 @@ export type TelemetryEventPropertyType = string | number | boolean | undefined;

* party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.
* @internal
*/

@@ -49,2 +53,3 @@ export interface Tagged<V, T extends string = string> {

* @deprecated Use Tagged\<TelemetryBaseEventPropertyType\>
* @internal
*/

@@ -58,2 +63,3 @@ export interface ITaggedTelemetryPropertyType {

* JSON-serializable properties, which will be logged with telemetry.
* @internal
*/

@@ -66,2 +72,3 @@ export type ITelemetryBaseProperties = ITelemetryProperties;

* @deprecated Renamed to {@link ITelemetryBaseProperties}
* @internal
*/

@@ -77,2 +84,3 @@ export interface ITelemetryProperties {

* @param eventName - name of the event.
* @internal
*/

@@ -86,2 +94,3 @@ export interface ITelemetryBaseEvent extends ITelemetryBaseProperties {

* Specify levels of the logs.
* @internal
*/

@@ -96,2 +105,3 @@ export const LogLevel = {

* Specify a level to the log to filter out logs based on the level.
* @internal
*/

@@ -103,2 +113,3 @@ export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];

* Implemented by hosting app / loader
* @internal
*/

@@ -117,2 +128,3 @@ export interface ITelemetryBaseLogger {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -130,2 +142,3 @@ export interface ITelemetryGenericEvent extends ITelemetryProperties {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -142,2 +155,3 @@ export interface ITelemetryErrorEvent extends ITelemetryProperties {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -150,2 +164,3 @@ export interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {

* An error object that supports exporting its properties to be logged to telemetry
* @internal
*/

@@ -166,2 +181,3 @@ export interface ILoggingError extends Error {

* No replacement intended for FluidFramework consumers.
* @internal
*/

@@ -168,0 +184,0 @@ export interface ITelemetryLogger extends ITelemetryBaseLogger {

@@ -30,2 +30,3 @@ /*!

* to FluidObject pattern.
* @internal
*/

@@ -73,3 +74,3 @@ export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp

* `FluidObject<IFoo & IBar>`
*
* @internal
*/

@@ -87,4 +88,4 @@ export type FluidObject<T = unknown> = {

* For example `FluidObjectKeys<IFoo & IBar>` would result in `"IFoo" | "IBar"`
*
* @internal
*/
export type FluidObjectKeys<T> = keyof FluidObject<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

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

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc