@fluidframework/core-interfaces 2.71.0 → 2.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +1 -1
- package/CHANGELOG.md +9 -9
- package/api-extractor/api-extractor-lint-legacy.alpha.cjs.json +5 -0
- package/api-extractor/api-extractor-lint-legacy.alpha.esm.json +5 -0
- package/api-extractor/api-extractor.legacy.json +5 -1
- package/api-report/core-interfaces.legacy.alpha.api.md +473 -0
- package/dist/error.d.ts +41 -11
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +14 -3
- package/dist/error.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/legacy.alpha.d.ts +73 -0
- package/dist/package.json +4 -0
- package/legacy/alpha.d.ts +11 -0
- package/lib/error.d.ts +41 -11
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js +13 -2
- package/lib/error.js.map +1 -1
- package/lib/index.d.ts +1 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/legacy.alpha.d.ts +73 -0
- package/package.json +19 -7
- package/src/cjs/package.json +4 -0
- package/src/error.ts +25 -15
- package/src/index.ts +4 -2
package/.eslintrc.cjs
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @fluidframework/core-interfaces
|
|
2
2
|
|
|
3
|
+
## 2.72.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added a new Fluid error type layerIncompatibilityError ([#25784](https://github.com/microsoft/FluidFramework/pull/25784)) [01d568b4bc](https://github.com/microsoft/FluidFramework/commit/01d568b4bcbff38a0ee4b614bad1dfb0c400a360)
|
|
8
|
+
|
|
9
|
+
A new Fluid error type `layerIncompatibilityError` is added to `FluidErrorTypesAlpha` as @legacy @alpha. This will be moved to `FluidErrorTypes` as @legacy @beta in a future legacy breaking release.
|
|
10
|
+
It will also be added to `ContainerErrorTypes` since it extends `FluidErrorTypes`.
|
|
11
|
+
|
|
3
12
|
## 2.71.0
|
|
4
13
|
|
|
5
14
|
Dependency updates only.
|
|
@@ -159,7 +168,6 @@ Dependency updates only.
|
|
|
159
168
|
|
|
160
169
|
Access to these now less public types should not be required for users of the `@public` "declarative API" exposed in the `fluid-framework` package, but can still be accessed for those who need them under the `/legacy` import paths.
|
|
161
170
|
The full list of such types is:
|
|
162
|
-
|
|
163
171
|
- `SharedTree` as exported from `@fluidframwork/tree`: It is still exported as `@public` from `fluid-framework` as `SharedObjectKind`.
|
|
164
172
|
- `ISharedObjectKind`: See new `SharedObjectKind` type for use in `@public` APIs.
|
|
165
173
|
`ISharedObject`
|
|
@@ -177,7 +185,6 @@ Dependency updates only.
|
|
|
177
185
|
- `IProvideFluidHandleContext`
|
|
178
186
|
|
|
179
187
|
Removed APIs:
|
|
180
|
-
|
|
181
188
|
- `DataObjectClass`: Usages replaced with `SharedObjectKind`.
|
|
182
189
|
- `LoadableObjectClass`: Replaced with `SharedObjectKind`.
|
|
183
190
|
- `LoadableObjectClassRecord`: Replaced with `Record<string, SharedObjectKind>`.
|
|
@@ -213,7 +220,6 @@ Dependency updates only.
|
|
|
213
220
|
- core-interfaces: Code details and package API surface removed [97d68aa06b](https://github.com/microsoft/FluidFramework/commit/97d68aa06bd5c022ecb026655814aea222a062ae)
|
|
214
221
|
|
|
215
222
|
The code details and package API surface was deprecated in @fluidframework/core-interfaces in 0.53 and has now been removed. Please import them from @fluidframework/container-definitions instead. These include:
|
|
216
|
-
|
|
217
223
|
- IFluidCodeDetails
|
|
218
224
|
- IFluidCodeDetailsComparer
|
|
219
225
|
- IFluidCodeDetailsConfig
|
|
@@ -230,7 +236,6 @@ Dependency updates only.
|
|
|
230
236
|
TypeScript types and implementation code.
|
|
231
237
|
|
|
232
238
|
This means that using Fluid Framework packages require the following TypeScript settings in tsconfig.json:
|
|
233
|
-
|
|
234
239
|
- `"moduleResolution": "Node16"` with `"module": "Node16"`
|
|
235
240
|
- `"moduleResolution": "Bundler"` with `"module": "ESNext"`
|
|
236
241
|
|
|
@@ -327,7 +332,6 @@ Dependency updates only.
|
|
|
327
332
|
- test-utils: provideEntryPoint is required [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
328
333
|
|
|
329
334
|
The optional `provideEntryPoint` method has become required on a number of constructors. A value will need to be provided to the following classes:
|
|
330
|
-
|
|
331
335
|
- `BaseContainerRuntimeFactory`
|
|
332
336
|
- `RuntimeFactory`
|
|
333
337
|
- `ContainerRuntime` (constructor and `loadRuntime`)
|
|
@@ -361,7 +365,6 @@ Dependency updates only.
|
|
|
361
365
|
- Cleaning up duplicate or misnamed telemetry types ([#17149](https://github.com/microsoft/FluidFramework/issues/17149)) [f9236942fa](https://github.com/microsoft/FluidFramework/commits/f9236942faf03cde860bfcbc7c28f8fbd81d3868)
|
|
362
366
|
|
|
363
367
|
We have two sets of telemetry-related interfaces:
|
|
364
|
-
|
|
365
368
|
- The "Base" ones
|
|
366
369
|
- These have a very bare API surface
|
|
367
370
|
- They are used on public API surfaces to transmit logs across layers
|
|
@@ -371,14 +374,12 @@ Dependency updates only.
|
|
|
371
374
|
- They are used for instrumenting our code, and then normalize and pass off the logs via the Base interface
|
|
372
375
|
|
|
373
376
|
There are two problems with the given state of the world:
|
|
374
|
-
|
|
375
377
|
1. The "Base" ones were not named consistently, so the distinction was not as apparent as it could be
|
|
376
378
|
2. The internal ones were copied to `@fluidframework/telemetry-utils` and futher extended, but the original duplicates remain.
|
|
377
379
|
|
|
378
380
|
This change addresses these by adding "Base" to the name of each base type, and deprecating the old duplicate internal types.
|
|
379
381
|
|
|
380
382
|
Additionally, the following types were adjusted:
|
|
381
|
-
|
|
382
383
|
- `TelemetryEventCategory` is moving from `@fluidframework/core-interfaces` to `@fluidframework/telemetry-utils`
|
|
383
384
|
- Several types modeling "tagged" telemetry properties are deprecated in favor of a generic type `Tagged<V>`
|
|
384
385
|
|
|
@@ -390,7 +391,6 @@ Dependency updates only.
|
|
|
390
391
|
|
|
391
392
|
The **@fluidframework/common-definitions** package is being deprecated, so the following interfaces and types are now
|
|
392
393
|
imported from the **@fluidframework/core-interfaces** package:
|
|
393
|
-
|
|
394
394
|
- interface IDisposable
|
|
395
395
|
- interface IErrorEvent
|
|
396
396
|
- interface IErrorEvent
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
|
|
4
|
+
"mainEntryPointFilePath": "<projectFolder>/dist/legacy.alpha.d.ts"
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
|
|
4
|
+
"mainEntryPointFilePath": "<projectFolder>/lib/legacy.alpha.d.ts"
|
|
5
|
+
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-report.esm.legacy.json"
|
|
3
|
+
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-report.esm.legacy.json",
|
|
4
|
+
"mainEntryPointFilePath": "<projectFolder>/lib/legacy.alpha.d.ts",
|
|
5
|
+
"apiReport": {
|
|
6
|
+
"reportVariants": ["public", "beta", "alpha"]
|
|
7
|
+
}
|
|
4
8
|
}
|
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
## Alpha API Report File for "@fluidframework/core-interfaces"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
// @public
|
|
8
|
+
export type ConfigTypes = string | number | boolean | number[] | string[] | boolean[] | undefined;
|
|
9
|
+
|
|
10
|
+
// @beta @sealed @system
|
|
11
|
+
export abstract class ErasedBaseType<out Name = unknown> {
|
|
12
|
+
protected constructor();
|
|
13
|
+
protected abstract brand(dummy: never): Name;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// @public @sealed
|
|
17
|
+
export abstract class ErasedType<out Name = unknown> {
|
|
18
|
+
static [Symbol.hasInstance](value: never): value is never;
|
|
19
|
+
protected abstract brand(dummy: never): Name;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// @public
|
|
23
|
+
export type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;
|
|
24
|
+
|
|
25
|
+
// @beta @legacy
|
|
26
|
+
export const FluidErrorTypes: {
|
|
27
|
+
readonly genericError: "genericError";
|
|
28
|
+
readonly throttlingError: "throttlingError";
|
|
29
|
+
readonly dataCorruptionError: "dataCorruptionError";
|
|
30
|
+
readonly dataProcessingError: "dataProcessingError";
|
|
31
|
+
readonly usageError: "usageError";
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// @beta @legacy (undocumented)
|
|
35
|
+
export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];
|
|
36
|
+
|
|
37
|
+
// @alpha @legacy
|
|
38
|
+
export const FluidErrorTypesAlpha: {
|
|
39
|
+
readonly layerIncompatibilityError: "layerIncompatibilityError";
|
|
40
|
+
readonly genericError: "genericError";
|
|
41
|
+
readonly throttlingError: "throttlingError";
|
|
42
|
+
readonly dataCorruptionError: "dataCorruptionError";
|
|
43
|
+
readonly dataProcessingError: "dataProcessingError";
|
|
44
|
+
readonly usageError: "usageError";
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// @alpha @legacy (undocumented)
|
|
48
|
+
export type FluidErrorTypesAlpha = (typeof FluidErrorTypesAlpha)[keyof typeof FluidErrorTypesAlpha];
|
|
49
|
+
|
|
50
|
+
// @public
|
|
51
|
+
export const fluidHandleSymbol: unique symbol;
|
|
52
|
+
|
|
53
|
+
// @public
|
|
54
|
+
export type FluidObject<T = unknown> = {
|
|
55
|
+
[P in FluidObjectProviderKeys<T>]?: T[P];
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// @public
|
|
59
|
+
export type FluidObjectKeys<T> = keyof FluidObject<T>;
|
|
60
|
+
|
|
61
|
+
// @public
|
|
62
|
+
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;
|
|
63
|
+
|
|
64
|
+
// @public
|
|
65
|
+
export interface IConfigProviderBase {
|
|
66
|
+
getRawConfig(name: string): ConfigTypes;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// @public @sealed
|
|
70
|
+
export interface IDisposable {
|
|
71
|
+
dispose(error?: Error): void;
|
|
72
|
+
readonly disposed: boolean;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// @public
|
|
76
|
+
export interface IErrorBase extends Partial<Error> {
|
|
77
|
+
readonly errorType: string;
|
|
78
|
+
getTelemetryProperties?(): ITelemetryBaseProperties;
|
|
79
|
+
readonly message: string;
|
|
80
|
+
readonly name?: string;
|
|
81
|
+
readonly stack?: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// @public
|
|
85
|
+
export interface IErrorEvent extends IEvent {
|
|
86
|
+
// @eventProperty
|
|
87
|
+
(event: "error", listener: (message: any) => void): any;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// @public
|
|
91
|
+
export interface IEvent {
|
|
92
|
+
// @eventProperty
|
|
93
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// @public @sealed
|
|
97
|
+
export interface IEventProvider<TEvent extends IEvent> {
|
|
98
|
+
readonly off: IEventTransformer<this, TEvent>;
|
|
99
|
+
readonly on: IEventTransformer<this, TEvent>;
|
|
100
|
+
readonly once: IEventTransformer<this, TEvent>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// @public
|
|
104
|
+
export type IEventThisPlaceHolder = {
|
|
105
|
+
thisPlaceHolder: "thisPlaceHolder";
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// @public
|
|
109
|
+
export type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {
|
|
110
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
111
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
112
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
113
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
114
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
115
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
116
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
117
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
118
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
119
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
120
|
+
(event: infer E10, listener: (...args: infer A10) => void): any;
|
|
121
|
+
(event: infer E11, listener: (...args: infer A11) => void): any;
|
|
122
|
+
(event: infer E12, listener: (...args: infer A12) => void): any;
|
|
123
|
+
(event: infer E13, listener: (...args: infer A13) => void): any;
|
|
124
|
+
(event: infer E14, listener: (...args: infer A14) => void): any;
|
|
125
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
126
|
+
} ? 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 {
|
|
127
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
128
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
129
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
130
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
131
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
132
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
133
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
134
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
135
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
136
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
137
|
+
(event: infer E10, listener: (...args: infer A10) => void): any;
|
|
138
|
+
(event: infer E11, listener: (...args: infer A11) => void): any;
|
|
139
|
+
(event: infer E12, listener: (...args: infer A12) => void): any;
|
|
140
|
+
(event: infer E13, listener: (...args: infer A13) => void): any;
|
|
141
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
142
|
+
} ? 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 {
|
|
143
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
144
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
145
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
146
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
147
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
148
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
149
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
150
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
151
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
152
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
153
|
+
(event: infer E10, listener: (...args: infer A10) => void): any;
|
|
154
|
+
(event: infer E11, listener: (...args: infer A11) => void): any;
|
|
155
|
+
(event: infer E12, listener: (...args: infer A12) => void): any;
|
|
156
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
157
|
+
} ? 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 {
|
|
158
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
159
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
160
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
161
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
162
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
163
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
164
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
165
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
166
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
167
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
168
|
+
(event: infer E10, listener: (...args: infer A10) => void): any;
|
|
169
|
+
(event: infer E11, listener: (...args: infer A11) => void): any;
|
|
170
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
171
|
+
} ? 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 {
|
|
172
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
173
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
174
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
175
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
176
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
177
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
178
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
179
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
180
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
181
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
182
|
+
(event: infer E10, listener: (...args: infer A10) => void): any;
|
|
183
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
184
|
+
} ? 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 {
|
|
185
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
186
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
187
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
188
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
189
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
190
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
191
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
192
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
193
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
194
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
195
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
196
|
+
} ? 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 {
|
|
197
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
198
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
199
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
200
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
201
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
202
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
203
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
204
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
205
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
206
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
207
|
+
} ? 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 {
|
|
208
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
209
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
210
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
211
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
212
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
213
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
214
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
215
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
216
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
217
|
+
} ? 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 {
|
|
218
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
219
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
220
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
221
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
222
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
223
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
224
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
225
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
226
|
+
} ? 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 {
|
|
227
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
228
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
229
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
230
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
231
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
232
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
233
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
234
|
+
} ? 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 {
|
|
235
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
236
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
237
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
238
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
239
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
240
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
241
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> : TEvent extends {
|
|
242
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
243
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
244
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
245
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
246
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
247
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> : TEvent extends {
|
|
248
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
249
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
250
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
251
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
252
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> : TEvent extends {
|
|
253
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
254
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
255
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
256
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> : TEvent extends {
|
|
257
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
258
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
259
|
+
} ? TransformedEvent<TThis, E0, A0> : TransformedEvent<TThis, string, any[]>;
|
|
260
|
+
|
|
261
|
+
// @public (undocumented)
|
|
262
|
+
export const IFluidHandle = "IFluidHandle";
|
|
263
|
+
|
|
264
|
+
// @public @sealed
|
|
265
|
+
export interface IFluidHandle<out T = unknown> {
|
|
266
|
+
readonly [fluidHandleSymbol]: IFluidHandleErased<T>;
|
|
267
|
+
get(): Promise<T>;
|
|
268
|
+
readonly isAttached: boolean;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// @beta @legacy (undocumented)
|
|
272
|
+
export const IFluidHandleContext: keyof IProvideFluidHandleContext;
|
|
273
|
+
|
|
274
|
+
// @beta @legacy
|
|
275
|
+
export interface IFluidHandleContext extends IProvideFluidHandleContext {
|
|
276
|
+
readonly absolutePath: string;
|
|
277
|
+
attachGraph(): void;
|
|
278
|
+
readonly isAttached: boolean;
|
|
279
|
+
// (undocumented)
|
|
280
|
+
resolveHandle(request: IRequest): Promise<IResponse>;
|
|
281
|
+
readonly routeContext?: IFluidHandleContext;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// @public @sealed
|
|
285
|
+
export interface IFluidHandleErased<T> extends ErasedType<readonly ["IFluidHandle", T]> {
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// @beta @legacy
|
|
289
|
+
export interface IFluidHandleEvents {
|
|
290
|
+
payloadShared: () => void;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// @beta @legacy
|
|
294
|
+
export interface IFluidHandleInternal<out T = unknown> extends IFluidHandle<T>, IProvideFluidHandle {
|
|
295
|
+
readonly absolutePath: string;
|
|
296
|
+
attachGraph(): void;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// @beta @legacy
|
|
300
|
+
export interface IFluidHandlePayloadPending<T> extends IFluidHandle<T> {
|
|
301
|
+
readonly events: Listenable<IFluidHandleEvents>;
|
|
302
|
+
readonly payloadState: PayloadState;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// @public (undocumented)
|
|
306
|
+
export const IFluidLoadable: keyof IProvideFluidLoadable;
|
|
307
|
+
|
|
308
|
+
// @public @sealed
|
|
309
|
+
export interface IFluidLoadable extends IProvideFluidLoadable {
|
|
310
|
+
readonly handle: IFluidHandle;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// @alpha @legacy
|
|
314
|
+
export interface ILayerIncompatibilityError extends IErrorBase {
|
|
315
|
+
readonly actualDifferenceInMonths: number;
|
|
316
|
+
readonly compatibilityRequirementsInMonths: number;
|
|
317
|
+
readonly details: string;
|
|
318
|
+
readonly errorType: typeof FluidErrorTypesAlpha.layerIncompatibilityError;
|
|
319
|
+
readonly incompatibleLayer: string;
|
|
320
|
+
readonly incompatibleLayerVersion: string;
|
|
321
|
+
readonly layer: string;
|
|
322
|
+
readonly layerVersion: string;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// @beta @legacy
|
|
326
|
+
export interface ILocalFluidHandle<T> extends IFluidHandlePayloadPending<T> {
|
|
327
|
+
readonly events: Listenable<IFluidHandleEvents & ILocalFluidHandleEvents>;
|
|
328
|
+
readonly payloadShareError: unknown;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
// @beta @legacy
|
|
332
|
+
export interface ILocalFluidHandleEvents extends IFluidHandleEvents {
|
|
333
|
+
payloadShareFailed: (error: unknown) => void;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// @beta @legacy
|
|
337
|
+
export interface ILoggingError extends Error {
|
|
338
|
+
getTelemetryProperties(): ITelemetryBaseProperties;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// @beta @deprecated @legacy (undocumented)
|
|
342
|
+
export interface IProvideFluidHandle {
|
|
343
|
+
// @deprecated (undocumented)
|
|
344
|
+
readonly [IFluidHandle]: IFluidHandleInternal;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
// @beta @legacy (undocumented)
|
|
348
|
+
export interface IProvideFluidHandleContext {
|
|
349
|
+
// (undocumented)
|
|
350
|
+
readonly IFluidHandleContext: IFluidHandleContext;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
// @public (undocumented)
|
|
354
|
+
export interface IProvideFluidLoadable {
|
|
355
|
+
// (undocumented)
|
|
356
|
+
readonly IFluidLoadable: IFluidLoadable;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// @public (undocumented)
|
|
360
|
+
export interface IRequest {
|
|
361
|
+
// (undocumented)
|
|
362
|
+
headers?: IRequestHeader;
|
|
363
|
+
// (undocumented)
|
|
364
|
+
url: string;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// @public (undocumented)
|
|
368
|
+
export interface IRequestHeader {
|
|
369
|
+
// (undocumented)
|
|
370
|
+
[index: string]: any;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// @public (undocumented)
|
|
374
|
+
export interface IResponse {
|
|
375
|
+
// (undocumented)
|
|
376
|
+
headers?: {
|
|
377
|
+
[key: string]: any;
|
|
378
|
+
};
|
|
379
|
+
// (undocumented)
|
|
380
|
+
mimeType: string;
|
|
381
|
+
// (undocumented)
|
|
382
|
+
stack?: string;
|
|
383
|
+
// (undocumented)
|
|
384
|
+
status: number;
|
|
385
|
+
// (undocumented)
|
|
386
|
+
value: any;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
// @public
|
|
390
|
+
export type IsListener<TListener> = TListener extends (...args: any[]) => void ? true : false;
|
|
391
|
+
|
|
392
|
+
// @public
|
|
393
|
+
export interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
|
|
394
|
+
// (undocumented)
|
|
395
|
+
category: string;
|
|
396
|
+
// (undocumented)
|
|
397
|
+
eventName: string;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// @public
|
|
401
|
+
export interface ITelemetryBaseLogger {
|
|
402
|
+
minLogLevel?: LogLevel;
|
|
403
|
+
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// @public
|
|
407
|
+
export interface ITelemetryBaseProperties {
|
|
408
|
+
[index: string]: TelemetryBaseEventPropertyType | Tagged<TelemetryBaseEventPropertyType>;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
// @beta @legacy
|
|
412
|
+
export interface IThrottlingWarning extends IErrorBase {
|
|
413
|
+
readonly errorType: typeof FluidErrorTypes.throttlingError;
|
|
414
|
+
// (undocumented)
|
|
415
|
+
readonly retryAfterSeconds: number;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// @public @sealed
|
|
419
|
+
export interface Listenable<TListeners extends object> {
|
|
420
|
+
off<K extends keyof Listeners<TListeners>>(eventName: K, listener: TListeners[K]): void;
|
|
421
|
+
// (undocumented)
|
|
422
|
+
on<K extends keyof Listeners<TListeners>>(eventName: K, listener: TListeners[K]): Off;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// @public
|
|
426
|
+
export type Listeners<T extends object> = {
|
|
427
|
+
[P in (string | symbol) & keyof T as IsListener<T[P]> extends true ? P : never]: T[P];
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
// @public
|
|
431
|
+
export const LogLevel: {
|
|
432
|
+
readonly verbose: 10;
|
|
433
|
+
readonly default: 20;
|
|
434
|
+
readonly error: 30;
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
// @public
|
|
438
|
+
export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
439
|
+
|
|
440
|
+
// @public
|
|
441
|
+
export type Off = () => void;
|
|
442
|
+
|
|
443
|
+
// @beta @legacy
|
|
444
|
+
export type PayloadState = "pending" | "shared";
|
|
445
|
+
|
|
446
|
+
// @public
|
|
447
|
+
export type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {
|
|
448
|
+
[K in keyof L]: L[K] extends IEventThisPlaceHolder ? TThis : L[K];
|
|
449
|
+
} : L;
|
|
450
|
+
|
|
451
|
+
// @public
|
|
452
|
+
export interface Tagged<V, T extends string = string> {
|
|
453
|
+
// (undocumented)
|
|
454
|
+
tag: T;
|
|
455
|
+
// (undocumented)
|
|
456
|
+
value: V;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
// @public
|
|
460
|
+
export type TelemetryBaseEventPropertyType = string | number | boolean | undefined;
|
|
461
|
+
|
|
462
|
+
// @public
|
|
463
|
+
export type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
|
|
464
|
+
|
|
465
|
+
// @beta @legacy
|
|
466
|
+
export interface TypedMessage {
|
|
467
|
+
content: unknown;
|
|
468
|
+
type: string;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
// (No @packageDocumentation comment for this package)
|
|
472
|
+
|
|
473
|
+
```
|
package/dist/error.d.ts
CHANGED
|
@@ -33,6 +33,45 @@ export declare const FluidErrorTypes: {
|
|
|
33
33
|
* @legacy @beta
|
|
34
34
|
*/
|
|
35
35
|
export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];
|
|
36
|
+
/**
|
|
37
|
+
* New error types that are still in alpha stage. Once stabilized, they will be moved to FluidErrorTypes.
|
|
38
|
+
* @legacy @alpha
|
|
39
|
+
*/
|
|
40
|
+
export declare const FluidErrorTypesAlpha: {
|
|
41
|
+
/**
|
|
42
|
+
* Error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is
|
|
43
|
+
* not compatible with the Runtime layer, the container create / load will fail with an error of this type.
|
|
44
|
+
* In most cases, the layer compatibility validation happens during container load / create causing it to
|
|
45
|
+
* fail with this error type.
|
|
46
|
+
* In some cases such as for the Runtime and DataStore layer compatibility, the incompatibility may be detected
|
|
47
|
+
* during data store loads. In such cases, the data store load will fail with this error type.
|
|
48
|
+
*/
|
|
49
|
+
readonly layerIncompatibilityError: "layerIncompatibilityError";
|
|
50
|
+
/**
|
|
51
|
+
* Some error, most likely an exception caught by runtime and propagated to container as critical error
|
|
52
|
+
*/
|
|
53
|
+
readonly genericError: "genericError";
|
|
54
|
+
/**
|
|
55
|
+
* Throttling error from server. Server is busy and is asking not to reconnect for some time
|
|
56
|
+
*/
|
|
57
|
+
readonly throttlingError: "throttlingError";
|
|
58
|
+
/**
|
|
59
|
+
* Data loss error detected by Container / DeltaManager. Likely points to storage issue.
|
|
60
|
+
*/
|
|
61
|
+
readonly dataCorruptionError: "dataCorruptionError";
|
|
62
|
+
/**
|
|
63
|
+
* Error encountered when processing an operation. May correlate with data corruption.
|
|
64
|
+
*/
|
|
65
|
+
readonly dataProcessingError: "dataProcessingError";
|
|
66
|
+
/**
|
|
67
|
+
* Error indicating an API is being used improperly resulting in an invalid operation.
|
|
68
|
+
*/
|
|
69
|
+
readonly usageError: "usageError";
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* @legacy @alpha
|
|
73
|
+
*/
|
|
74
|
+
export type FluidErrorTypesAlpha = (typeof FluidErrorTypesAlpha)[keyof typeof FluidErrorTypesAlpha];
|
|
36
75
|
/**
|
|
37
76
|
* Base interface for all errors and warnings emitted the container.
|
|
38
77
|
*
|
|
@@ -111,12 +150,7 @@ export interface IThrottlingWarning extends IErrorBase {
|
|
|
111
150
|
readonly retryAfterSeconds: number;
|
|
112
151
|
}
|
|
113
152
|
/**
|
|
114
|
-
*
|
|
115
|
-
* @legacy @alpha
|
|
116
|
-
*/
|
|
117
|
-
export declare const layerIncompatibilityErrorSymbol: unique symbol;
|
|
118
|
-
/**
|
|
119
|
-
* Usage error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is
|
|
153
|
+
* Layer incompatibility error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is
|
|
120
154
|
* not compatible with the Runtime layer, the container will be disposed with this error.
|
|
121
155
|
* @legacy @alpha
|
|
122
156
|
*/
|
|
@@ -124,11 +158,7 @@ export interface ILayerIncompatibilityError extends IErrorBase {
|
|
|
124
158
|
/**
|
|
125
159
|
* {@inheritDoc IErrorBase.errorType}
|
|
126
160
|
*/
|
|
127
|
-
readonly errorType: typeof
|
|
128
|
-
/**
|
|
129
|
-
* Symbol used to identify this error as a layer incompatibility error.
|
|
130
|
-
*/
|
|
131
|
-
readonly [layerIncompatibilityErrorSymbol]: true;
|
|
161
|
+
readonly errorType: typeof FluidErrorTypesAlpha.layerIncompatibilityError;
|
|
132
162
|
/**
|
|
133
163
|
* The layer that is reporting the incompatibility.
|
|
134
164
|
*/
|