@fluidframework/core-interfaces 2.0.0-dev.5.3.2.178189 → 2.0.0-dev.6.4.0.191457
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.js +1 -1
- package/CHANGELOG.md +75 -0
- package/README.md +4 -3
- package/Removing-IFluidRouter.md +113 -0
- package/dist/error.d.ts +105 -0
- package/dist/error.d.ts.map +1 -0
- package/dist/error.js +33 -0
- package/dist/error.js.map +1 -0
- package/dist/events.d.ts +251 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +7 -0
- package/dist/events.js.map +1 -0
- package/dist/fluidLoadable.d.ts.map +1 -1
- package/dist/fluidLoadable.js.map +1 -1
- package/dist/fluidPackage.d.ts +1 -1
- package/dist/fluidPackage.d.ts.map +1 -1
- package/dist/fluidPackage.js +7 -4
- package/dist/fluidPackage.js.map +1 -1
- package/dist/fluidRouter.d.ts.map +1 -1
- package/dist/fluidRouter.js.map +1 -1
- package/dist/index.d.ts +13 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +64 -9
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +9 -0
- package/dist/logger.js.map +1 -1
- package/dist/provider.d.ts +11 -5
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js.map +1 -1
- package/lib/error.d.ts +105 -0
- package/lib/error.d.ts.map +1 -0
- package/lib/error.js +30 -0
- package/lib/error.js.map +1 -0
- package/lib/events.d.ts +251 -0
- package/lib/events.d.ts.map +1 -0
- package/lib/events.js +6 -0
- package/lib/events.js.map +1 -0
- package/lib/fluidLoadable.d.ts.map +1 -1
- package/lib/fluidLoadable.js.map +1 -1
- package/lib/fluidPackage.d.ts +1 -1
- package/lib/fluidPackage.d.ts.map +1 -1
- package/lib/fluidPackage.js +7 -4
- package/lib/fluidPackage.js.map +1 -1
- package/lib/fluidRouter.d.ts.map +1 -1
- package/lib/fluidRouter.js.map +1 -1
- package/lib/index.d.ts +13 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib/logger.d.ts +64 -9
- package/lib/logger.d.ts.map +1 -1
- package/lib/logger.js +8 -1
- package/lib/logger.js.map +1 -1
- package/lib/provider.d.ts +11 -5
- package/lib/provider.d.ts.map +1 -1
- package/lib/provider.js.map +1 -1
- package/package.json +8 -9
- package/src/error.ts +121 -0
- package/src/events.ts +432 -0
- package/src/fluidLoadable.ts +2 -0
- package/src/fluidPackage.ts +5 -2
- package/src/fluidRouter.ts +6 -0
- package/src/index.ts +45 -21
- package/src/logger.ts +82 -11
- package/src/provider.ts +11 -5
package/.eslintrc.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
module.exports = {
|
|
7
|
-
extends: [require.resolve("@fluidframework/eslint-config-fluid
|
|
7
|
+
extends: [require.resolve("@fluidframework/eslint-config-fluid"), "prettier"],
|
|
8
8
|
parserOptions: {
|
|
9
9
|
project: ["./tsconfig.json", "./src/test/tsconfig.json"],
|
|
10
10
|
},
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,80 @@
|
|
|
1
1
|
# @fluidframework/core-interfaces
|
|
2
2
|
|
|
3
|
+
## 2.0.0-internal.6.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Cleaning up duplicate or misnamed telemetry types ([#17149](https://github.com/microsoft/FluidFramework/issues/17149)) [f9236942fa](https://github.com/microsoft/FluidFramework/commits/f9236942faf03cde860bfcbc7c28f8fbd81d3868)
|
|
8
|
+
|
|
9
|
+
We have two sets of telemetry-related interfaces:
|
|
10
|
+
|
|
11
|
+
- The "Base" ones
|
|
12
|
+
- These have a very bare API surface
|
|
13
|
+
- They are used on public API surfaces to transmit logs across layers
|
|
14
|
+
- The internal ones
|
|
15
|
+
- These have a richer API surface (multiple log functions with different categories,
|
|
16
|
+
support for logging flat arrays and objects)
|
|
17
|
+
- They are used for instrumenting our code, and then normalize and pass off the logs via the Base interface
|
|
18
|
+
|
|
19
|
+
There are two problems with the given state of the world:
|
|
20
|
+
|
|
21
|
+
1. The "Base" ones were not named consistently, so the distinction was not as apparent as it could be
|
|
22
|
+
2. The internal ones were copied to `@fluidframework/telemetry-utils` and futher extended, but the original duplicates remain.
|
|
23
|
+
|
|
24
|
+
This change addresses these by adding "Base" to the name of each base type, and deprecating the old duplicate internal types.
|
|
25
|
+
|
|
26
|
+
Additionally, the following types were adjusted:
|
|
27
|
+
|
|
28
|
+
- `TelemetryEventCategory` is moving from `@fluidframework/core-interfaces` to `@fluidframework/telemetry-utils`
|
|
29
|
+
- Several types modeling "tagged" telemetry properties are deprecated in favor of a generic type `Tagged<V>`
|
|
30
|
+
|
|
31
|
+
## 2.0.0-internal.6.2.0
|
|
32
|
+
|
|
33
|
+
### Minor Changes
|
|
34
|
+
|
|
35
|
+
- Remove use of @fluidframework/common-definitions ([#16638](https://github.com/microsoft/FluidFramework/issues/16638)) [a8c81509c9](https://github.com/microsoft/FluidFramework/commits/a8c81509c9bf09cfb2092ebcf7265205f9eb6dbf)
|
|
36
|
+
|
|
37
|
+
The **@fluidframework/common-definitions** package is being deprecated, so the following interfaces and types are now
|
|
38
|
+
imported from the **@fluidframework/core-interfaces** package:
|
|
39
|
+
|
|
40
|
+
- interface IDisposable
|
|
41
|
+
- interface IErrorEvent
|
|
42
|
+
- interface IErrorEvent
|
|
43
|
+
- interface IEvent
|
|
44
|
+
- interface IEventProvider
|
|
45
|
+
- interface ILoggingError
|
|
46
|
+
- interface ITaggedTelemetryPropertyType
|
|
47
|
+
- interface ITelemetryBaseEvent
|
|
48
|
+
- interface ITelemetryBaseLogger
|
|
49
|
+
- interface ITelemetryErrorEvent
|
|
50
|
+
- interface ITelemetryGenericEvent
|
|
51
|
+
- interface ITelemetryLogger
|
|
52
|
+
- interface ITelemetryPerformanceEvent
|
|
53
|
+
- interface ITelemetryProperties
|
|
54
|
+
- type ExtendEventProvider
|
|
55
|
+
- type IEventThisPlaceHolder
|
|
56
|
+
- type IEventTransformer
|
|
57
|
+
- type ReplaceIEventThisPlaceHolder
|
|
58
|
+
- type ReplaceIEventThisPlaceHolder
|
|
59
|
+
- type TelemetryEventCategory
|
|
60
|
+
- type TelemetryEventPropertyType
|
|
61
|
+
|
|
62
|
+
## 2.0.0-internal.6.1.0
|
|
63
|
+
|
|
64
|
+
Dependency updates only.
|
|
65
|
+
|
|
66
|
+
## 2.0.0-internal.6.0.0
|
|
67
|
+
|
|
68
|
+
### Major Changes
|
|
69
|
+
|
|
70
|
+
- Upgraded typescript transpilation target to ES2020 [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
|
|
71
|
+
|
|
72
|
+
Upgraded typescript transpilation target to ES2020. This is done in order to decrease the bundle sizes of Fluid Framework packages. This has provided size improvements across the board for ex. Loader, Driver, Runtime etc. Reduced bundle sizes helps to load lesser code in apps and hence also helps to improve the perf.If any app wants to target any older versions of browsers with which this target version is not compatible, then they can use packages like babel to transpile to a older target.
|
|
73
|
+
|
|
74
|
+
## 2.0.0-internal.5.4.0
|
|
75
|
+
|
|
76
|
+
Dependency updates only.
|
|
77
|
+
|
|
3
78
|
## 2.0.0-internal.5.3.0
|
|
4
79
|
|
|
5
80
|
Dependency updates only.
|
package/README.md
CHANGED
|
@@ -15,9 +15,10 @@ When taking a dependency on a Fluid Framework library, we recommend using a `^`
|
|
|
15
15
|
While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
|
|
16
16
|
library consumers should always prefer `^`.
|
|
17
17
|
|
|
18
|
-
Note that when depending on a library version of the form 2.0.0-internal.x.y.z
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
Note that when depending on a library version of the form `2.0.0-internal.x.y.z`, called the Fluid internal version scheme,
|
|
19
|
+
you must use a `>= <` dependency range (such as `>=2.0.0-internal.x.y.z <2.0.0-internal.w.0.0` where `w` is `x+1`).
|
|
20
|
+
Standard `^` and `~` ranges will not work as expected.
|
|
21
|
+
See the [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
|
|
21
22
|
package for more information including tools to convert between version schemes.
|
|
22
23
|
|
|
23
24
|
<!-- prettier-ignore-end -->
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Removing IFluidRouter
|
|
2
|
+
|
|
3
|
+
The interface `IFluidRouter` is being deprecated and removed over the next several internal releases.
|
|
4
|
+
It exposes a `request` function and is implemented across Fluid Framework's layers to light up the "request pattern"
|
|
5
|
+
for accessing objects out of a Fluid Container.
|
|
6
|
+
The request pattern is incompatible with [Garbage Collection](../../runtime/container-runtime/src/gc/garbageCollection.md),
|
|
7
|
+
so any code that previously accessed an object via request should migrate to using handles instead.
|
|
8
|
+
|
|
9
|
+
This document serves as a "how-to" guide for this migration, and will also include the latest status of the work.
|
|
10
|
+
|
|
11
|
+
## Key Concepts
|
|
12
|
+
|
|
13
|
+
### `IFluidRouter` and `absolutePath`
|
|
14
|
+
|
|
15
|
+
Here's what [`IFluidRouter`](src/fluidRouter.ts) looks like:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
export interface IProvideFluidRouter {
|
|
19
|
+
readonly IFluidRouter: IFluidRouter;
|
|
20
|
+
}
|
|
21
|
+
export interface IFluidRouter extends IProvideFluidRouter {
|
|
22
|
+
request(request: IRequest): Promise<IResponse>;
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
It uses the Provider pattern so any Fluid Object may be queried for `IFluidRouter` to call `request` on if present.
|
|
27
|
+
|
|
28
|
+
Here's the **deprecated** flow for referencing and accessing an object:
|
|
29
|
+
|
|
30
|
+
1. Store the object's `absolutePath` (a container-relative URL path) in some DDS
|
|
31
|
+
2. Later, load the object via `request({ url: absolutePath })`
|
|
32
|
+
|
|
33
|
+
### `IFluidLoadable` and `IFluidHandle`
|
|
34
|
+
|
|
35
|
+
The new way to reference an object within a Fluid Container is via its `handle`:
|
|
36
|
+
|
|
37
|
+
1. Store the object's `handle` in some DDS
|
|
38
|
+
2. Later, load the object via `handle.get()`
|
|
39
|
+
|
|
40
|
+
### Entry Point
|
|
41
|
+
|
|
42
|
+
`request` has also been used as the way to get at the application-specific Container and DataStore implementations
|
|
43
|
+
starting from native Fluid types like `IContainer` and `IDataStore` - both of which have extended `IFluidRouter`.
|
|
44
|
+
The new way to do this is via the object's "entry point".
|
|
45
|
+
|
|
46
|
+
Here it is on `IContainer`, returning an anonymous `FluidObject` - the application-specified root object:
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
getEntryPoint?(): Promise<FluidObject | undefined>;
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
And here it is on `IDataStore`, returning an `IFluidHandle` to an anonymous `FluidObject` - the DataStore's root object:
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
readonly entryPoint?: IFluidHandle<FluidObject>;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
So how does an application specify what the Container or DataStore's entry point is?
|
|
59
|
+
Via a parameter `initializeEntryPoint` that's found on `ContainerRuntime.loadRuntime` and `FluidDataStoreRuntime`'s constructor.
|
|
60
|
+
|
|
61
|
+
### ILoader request pattern
|
|
62
|
+
|
|
63
|
+
The `request` API (associated with the `IFluidRouter` interface) has been deprecated on `ILoader` and `Loader`.
|
|
64
|
+
|
|
65
|
+
**Note:** The `IContainer.request(...)` method will be deprecated in an upcoming release, so do not rely on this method for a long-term solution (the APIs around `entryPoint` and `getEntryPoint()` will become required and available for usage in its place).
|
|
66
|
+
|
|
67
|
+
After calling `ILoader.resolve(...)`, call the `request(...)` method on the returned `IContainer` with a corresponding request URL. For converting a request URL from `Loader` to `Container`, use the `IUrlResolver` passed into the `Loader`'s constructor.
|
|
68
|
+
The following is an example of what this change may look like:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
// OLD
|
|
72
|
+
const request: IRequest;
|
|
73
|
+
const urlResolver = new YourUrlResolver();
|
|
74
|
+
const loader = new Loader({ urlResolver, ... });
|
|
75
|
+
|
|
76
|
+
await loader.resolve(request);
|
|
77
|
+
const response = loader.request(request);
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
// NEW
|
|
82
|
+
const request: IRequest;
|
|
83
|
+
const urlResolver = new YourUrlResolver();
|
|
84
|
+
const loader = new Loader({ urlResolver, ... });
|
|
85
|
+
|
|
86
|
+
const container = await loader.resolve(request);
|
|
87
|
+
const resolvedUrl: IRequest = urlResolver.resolve(request);
|
|
88
|
+
|
|
89
|
+
// Parse the `resolvedUrl.url` property as necessary before passing to `container.request(...)`
|
|
90
|
+
// For an example, see the `Loader.resolveCore(...)` method
|
|
91
|
+
const parsedResolvedUrl = // implement parse logic here
|
|
92
|
+
const response = container.request(parsedResolvedUrl);
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Aliased DataStores
|
|
96
|
+
|
|
97
|
+
(Not yet written)
|
|
98
|
+
|
|
99
|
+
## Status
|
|
100
|
+
|
|
101
|
+
<!-- prettier-ignore-start -->
|
|
102
|
+
| API | Deprecated in | Removed in |
|
|
103
|
+
| ------------------------------------------------------------------------------------ | -------------------- | -------------------- |
|
|
104
|
+
| `IContainer.request` (except calling with "/") | 2.0.0-internal.6.0.0 | |
|
|
105
|
+
| `IDataStore.request` (except calling with "/") | 2.0.0-internal.6.0.0 | |
|
|
106
|
+
| `IContainer.IFluidRouter` | 2.0.0-internal.6.0.0 | |
|
|
107
|
+
| `IDataStore.IFluidRouter` | 2.0.0-internal.6.0.0 | |
|
|
108
|
+
| `request` and `IFluidRouter` on `ILoader` and `Loader` | 2.0.0-internal.6.0.0 | |
|
|
109
|
+
| `request` and `IFluidRouter` on `IRuntime` and `ContainerRuntime` | 2.0.0-internal.6.0.0 | |
|
|
110
|
+
| `request` and `IFluidRouter` on `IFluidDataStoreRuntime` and `FluidDataStoreRuntime` | 2.0.0-internal.6.0.0 | |
|
|
111
|
+
| `request` and `IFluidRouter` on `IFluidDataStoreChannel` | 2.0.0-internal.6.0.0 | |
|
|
112
|
+
| `getRootDataStore` on `IContainerRuntime` and `ContainerRuntime` | 2.0.0-internal.6.0.0 | |
|
|
113
|
+
<!-- prettier-ignore-end -->
|
package/dist/error.d.ts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { ITelemetryBaseProperties } from "./index";
|
|
6
|
+
/**
|
|
7
|
+
* Error types the Fluid Framework may report.
|
|
8
|
+
*/
|
|
9
|
+
export declare const FluidErrorTypes: {
|
|
10
|
+
/**
|
|
11
|
+
* Some error, most likely an exception caught by runtime and propagated to container as critical error
|
|
12
|
+
*/
|
|
13
|
+
readonly genericError: "genericError";
|
|
14
|
+
/**
|
|
15
|
+
* Throttling error from server. Server is busy and is asking not to reconnect for some time
|
|
16
|
+
*/
|
|
17
|
+
readonly throttlingError: "throttlingError";
|
|
18
|
+
/**
|
|
19
|
+
* Data loss error detected by Container / DeltaManager. Likely points to storage issue.
|
|
20
|
+
*/
|
|
21
|
+
readonly dataCorruptionError: "dataCorruptionError";
|
|
22
|
+
/**
|
|
23
|
+
* Error encountered when processing an operation. May correlate with data corruption.
|
|
24
|
+
*/
|
|
25
|
+
readonly dataProcessingError: "dataProcessingError";
|
|
26
|
+
/**
|
|
27
|
+
* Error indicating an API is being used improperly resulting in an invalid operation.
|
|
28
|
+
*/
|
|
29
|
+
readonly usageError: "usageError";
|
|
30
|
+
};
|
|
31
|
+
export declare type FluidErrorTypes = typeof FluidErrorTypes[keyof typeof FluidErrorTypes];
|
|
32
|
+
/**
|
|
33
|
+
* Base interface for all errors and warnings emitted the container.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
*
|
|
37
|
+
* We are in the process of unifying error types across layers of the Framework. For now we have only migrated
|
|
38
|
+
* those from container-definitions. Once fully migrated, this will be a base interface for all errors and
|
|
39
|
+
* warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.
|
|
40
|
+
* Runtime and others will follow soon.
|
|
41
|
+
*/
|
|
42
|
+
export interface IErrorBase extends Partial<Error> {
|
|
43
|
+
/**
|
|
44
|
+
* A type tag differentiating kinds of errors emitted by the container.
|
|
45
|
+
*
|
|
46
|
+
* @see See {@link FluidErrorTypes#genericError} for some common examples.
|
|
47
|
+
* - container
|
|
48
|
+
* - runtime
|
|
49
|
+
* - drivers
|
|
50
|
+
*/
|
|
51
|
+
readonly errorType: string;
|
|
52
|
+
/**
|
|
53
|
+
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
*
|
|
57
|
+
* Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)
|
|
58
|
+
* If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result
|
|
59
|
+
* of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.
|
|
60
|
+
*/
|
|
61
|
+
readonly message: string;
|
|
62
|
+
/**
|
|
63
|
+
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}
|
|
64
|
+
*/
|
|
65
|
+
readonly name?: string;
|
|
66
|
+
/**
|
|
67
|
+
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}
|
|
68
|
+
*/
|
|
69
|
+
readonly stack?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Returns all properties of this error object that are fit for logging.
|
|
72
|
+
* Some may be tagged to indicate they contain some kind of sensitive data.
|
|
73
|
+
*/
|
|
74
|
+
getTelemetryProperties?(): ITelemetryBaseProperties;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Generic wrapper for an unrecognized/uncategorized error object
|
|
78
|
+
*/
|
|
79
|
+
export interface IGenericError extends IErrorBase {
|
|
80
|
+
/**
|
|
81
|
+
* {@inheritDoc IErrorBase.errorType}
|
|
82
|
+
*/
|
|
83
|
+
readonly errorType: typeof FluidErrorTypes.genericError;
|
|
84
|
+
error?: any;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Error indicating an API is being used improperly resulting in an invalid operation.
|
|
88
|
+
*/
|
|
89
|
+
export interface IUsageError extends IErrorBase {
|
|
90
|
+
/**
|
|
91
|
+
* {@inheritDoc IErrorBase.errorType}
|
|
92
|
+
*/
|
|
93
|
+
readonly errorType: typeof FluidErrorTypes.usageError;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Warning emitted when requests to storage are being throttled
|
|
97
|
+
*/
|
|
98
|
+
export interface IThrottlingWarning extends IErrorBase {
|
|
99
|
+
/**
|
|
100
|
+
* {@inheritDoc IErrorBase.errorType}
|
|
101
|
+
*/
|
|
102
|
+
readonly errorType: typeof FluidErrorTypes.throttlingError;
|
|
103
|
+
readonly retryAfterSeconds: number;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,eAAe;IAC3B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEM,CAAC;AACX,oBAAY,eAAe,GAAG,OAAO,eAAe,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAEnF;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAW,SAAQ,OAAO,CAAC,KAAK,CAAC;IACjD;;;;;;;OAOG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;;;;;;;OAQG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,sBAAsB,CAAC,IAAI,wBAAwB,CAAC;CACpD;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,UAAU;IAChD;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,eAAe,CAAC,YAAY,CAAC;IAIxD,KAAK,CAAC,EAAE,GAAG,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC9C;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,eAAe,CAAC,UAAU,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACrD;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,eAAe,CAAC,eAAe,CAAC;IAC3D,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACnC"}
|
package/dist/error.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.FluidErrorTypes = void 0;
|
|
8
|
+
/**
|
|
9
|
+
* Error types the Fluid Framework may report.
|
|
10
|
+
*/
|
|
11
|
+
exports.FluidErrorTypes = {
|
|
12
|
+
/**
|
|
13
|
+
* Some error, most likely an exception caught by runtime and propagated to container as critical error
|
|
14
|
+
*/
|
|
15
|
+
genericError: "genericError",
|
|
16
|
+
/**
|
|
17
|
+
* Throttling error from server. Server is busy and is asking not to reconnect for some time
|
|
18
|
+
*/
|
|
19
|
+
throttlingError: "throttlingError",
|
|
20
|
+
/**
|
|
21
|
+
* Data loss error detected by Container / DeltaManager. Likely points to storage issue.
|
|
22
|
+
*/
|
|
23
|
+
dataCorruptionError: "dataCorruptionError",
|
|
24
|
+
/**
|
|
25
|
+
* Error encountered when processing an operation. May correlate with data corruption.
|
|
26
|
+
*/
|
|
27
|
+
dataProcessingError: "dataProcessingError",
|
|
28
|
+
/**
|
|
29
|
+
* Error indicating an API is being used improperly resulting in an invalid operation.
|
|
30
|
+
*/
|
|
31
|
+
usageError: "usageError",
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;GAEG;AACU,QAAA,eAAe,GAAG;IAC9B;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,UAAU,EAAE,YAAY;CACf,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseProperties } from \"./index\";\n\n/**\n * Error types the Fluid Framework may report.\n */\nexport const FluidErrorTypes = {\n\t/**\n\t * Some error, most likely an exception caught by runtime and propagated to container as critical error\n\t */\n\tgenericError: \"genericError\",\n\n\t/**\n\t * Throttling error from server. Server is busy and is asking not to reconnect for some time\n\t */\n\tthrottlingError: \"throttlingError\",\n\n\t/**\n\t * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n\t */\n\tdataCorruptionError: \"dataCorruptionError\",\n\n\t/**\n\t * Error encountered when processing an operation. May correlate with data corruption.\n\t */\n\tdataProcessingError: \"dataProcessingError\",\n\n\t/**\n\t * Error indicating an API is being used improperly resulting in an invalid operation.\n\t */\n\tusageError: \"usageError\",\n} as const;\nexport type FluidErrorTypes = typeof FluidErrorTypes[keyof typeof FluidErrorTypes];\n\n/**\n * Base interface for all errors and warnings emitted the container.\n *\n * @remarks\n *\n * We are in the process of unifying error types across layers of the Framework. For now we have only migrated\n * those from container-definitions. Once fully migrated, this will be a base interface for all errors and\n * warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.\n * Runtime and others will follow soon.\n */\nexport interface IErrorBase extends Partial<Error> {\n\t/**\n\t * A type tag differentiating kinds of errors emitted by the container.\n\t *\n\t * @see See {@link FluidErrorTypes#genericError} for some common examples.\n\t * - container\n\t * - runtime\n\t * - drivers\n\t */\n\treadonly errorType: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}\n\t *\n\t * @remarks\n\t *\n\t * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)\n\t * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result\n\t * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.\n\t */\n\treadonly message: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}\n\t */\n\treadonly name?: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}\n\t */\n\treadonly stack?: string;\n\n\t/**\n\t * Returns all properties of this error object that are fit for logging.\n\t * Some may be tagged to indicate they contain some kind of sensitive data.\n\t */\n\tgetTelemetryProperties?(): ITelemetryBaseProperties;\n}\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n */\nexport interface IGenericError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.genericError;\n\n\t// TODO: Use `unknown` instead (API-Breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\terror?: any;\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\nexport interface IUsageError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.usageError;\n}\n\n/**\n * Warning emitted when requests to storage are being throttled\n */\nexport interface IThrottlingWarning extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.throttlingError;\n\treadonly retryAfterSeconds: number;\n}\n"]}
|
package/dist/events.d.ts
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Base interface for event emitters.
|
|
7
|
+
*/
|
|
8
|
+
export interface IEvent {
|
|
9
|
+
/**
|
|
10
|
+
* Base event emitter signature.
|
|
11
|
+
*
|
|
12
|
+
* @remarks The event emitter polyfill and the node event emitter have different event types:
|
|
13
|
+
* `string | symbol` vs. `string | number`.
|
|
14
|
+
*
|
|
15
|
+
* So for our typing we'll contrain to string, that way we work with both.
|
|
16
|
+
*
|
|
17
|
+
* @eventProperty
|
|
18
|
+
*/
|
|
19
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Base interface for error event emitters.
|
|
23
|
+
*/
|
|
24
|
+
export interface IErrorEvent extends IEvent {
|
|
25
|
+
/**
|
|
26
|
+
* Base error event emitter signature.
|
|
27
|
+
*
|
|
28
|
+
* @eventProperty
|
|
29
|
+
*/
|
|
30
|
+
(event: "error", listener: (message: any) => void): any;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Base interface for event providers.
|
|
34
|
+
*/
|
|
35
|
+
export interface IEventProvider<TEvent extends IEvent> {
|
|
36
|
+
/**
|
|
37
|
+
* Registers a callback to be invoked when the corresponding event is triggered.
|
|
38
|
+
*/
|
|
39
|
+
readonly on: IEventTransformer<this, TEvent>;
|
|
40
|
+
/**
|
|
41
|
+
* Registers a callback to be invoked the first time (after registration) the corresponding event is triggered.
|
|
42
|
+
*/
|
|
43
|
+
readonly once: IEventTransformer<this, TEvent>;
|
|
44
|
+
/**
|
|
45
|
+
* Removes the corresponding event if it has been registered.
|
|
46
|
+
*/
|
|
47
|
+
readonly off: IEventTransformer<this, TEvent>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Allows an interface to extend interfaces that already extend an {@link IEventProvider}.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
*
|
|
54
|
+
* ``` typescript
|
|
55
|
+
* interface AEvents extends IEvent{
|
|
56
|
+
* (event: "a-event",listener: (a: number)=>void);
|
|
57
|
+
* }
|
|
58
|
+
* interface A extends IEventProvider<AEvents>{
|
|
59
|
+
* a: object;
|
|
60
|
+
* }
|
|
61
|
+
*
|
|
62
|
+
* interface BEvents extends IEvent{
|
|
63
|
+
* (event: "b-event",listener: (b: string)=>void);
|
|
64
|
+
* }
|
|
65
|
+
* interface B extends ExtendEventProvider<AEvents, A, BEvents>{
|
|
66
|
+
* b: boolean;
|
|
67
|
+
* };
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* interface B will now extend interface A and its events
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
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>;
|
|
74
|
+
/**
|
|
75
|
+
* The placeholder type that should be used instead of `this` in events.
|
|
76
|
+
*/
|
|
77
|
+
export declare type IEventThisPlaceHolder = {
|
|
78
|
+
thisPlaceHolder: "thisPlaceHolder";
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Does the type replacement by changing types of {@link IEventThisPlaceHolder} to `TThis`
|
|
82
|
+
*/
|
|
83
|
+
export declare type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {
|
|
84
|
+
[K in keyof L]: L[K] extends IEventThisPlaceHolder ? TThis : L[K];
|
|
85
|
+
} : L;
|
|
86
|
+
/**
|
|
87
|
+
* Transforms the event overload by replacing {@link IEventThisPlaceHolder} with `TThis` in the event listener
|
|
88
|
+
* arguments and having the overload return `TTHis` as well
|
|
89
|
+
*/
|
|
90
|
+
export declare type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
|
|
91
|
+
/**
|
|
92
|
+
* This type is a conditional type for transforming all the overloads provided in `TEvent`.
|
|
93
|
+
*
|
|
94
|
+
* @remarks
|
|
95
|
+
* Due to limitations of the TypeScript typing system, we need to handle each number of overload individually.
|
|
96
|
+
* It currently supports the max of 15 event overloads which is more than we use anywhere.
|
|
97
|
+
* At more than 15 overloads we start to hit {@link https://github.com/microsoft/TypeScript/issues/37209 | TS2589}.
|
|
98
|
+
* If we need to move beyond 15 we should evaluate using a mapped type pattern like `{"event":(listenerArgs)=>void}`
|
|
99
|
+
*/
|
|
100
|
+
export declare type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {
|
|
101
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
102
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
103
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
104
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
105
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
106
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
107
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
108
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
109
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
110
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
111
|
+
(event: infer E10, listener: (...args: infer A10) => void): any;
|
|
112
|
+
(event: infer E11, listener: (...args: infer A11) => void): any;
|
|
113
|
+
(event: infer E12, listener: (...args: infer A12) => void): any;
|
|
114
|
+
(event: infer E13, listener: (...args: infer A13) => void): any;
|
|
115
|
+
(event: infer E14, listener: (...args: infer A14) => void): any;
|
|
116
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
117
|
+
} ? 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 {
|
|
118
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
119
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
120
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
121
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
122
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
123
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
124
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
125
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
126
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
127
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
128
|
+
(event: infer E10, listener: (...args: infer A10) => void): any;
|
|
129
|
+
(event: infer E11, listener: (...args: infer A11) => void): any;
|
|
130
|
+
(event: infer E12, listener: (...args: infer A12) => void): any;
|
|
131
|
+
(event: infer E13, listener: (...args: infer A13) => void): any;
|
|
132
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
133
|
+
} ? 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 {
|
|
134
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
135
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
136
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
137
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
138
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
139
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
140
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
141
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
142
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
143
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
144
|
+
(event: infer E10, listener: (...args: infer A10) => void): any;
|
|
145
|
+
(event: infer E11, listener: (...args: infer A11) => void): any;
|
|
146
|
+
(event: infer E12, listener: (...args: infer A12) => void): any;
|
|
147
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
148
|
+
} ? 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 {
|
|
149
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
150
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
151
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
152
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
153
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
154
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
155
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
156
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
157
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
158
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
159
|
+
(event: infer E10, listener: (...args: infer A10) => void): any;
|
|
160
|
+
(event: infer E11, listener: (...args: infer A11) => void): any;
|
|
161
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
162
|
+
} ? 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 {
|
|
163
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
164
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
165
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
166
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
167
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
168
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
169
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
170
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
171
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
172
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
173
|
+
(event: infer E10, listener: (...args: infer A10) => void): any;
|
|
174
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
175
|
+
} ? 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 {
|
|
176
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
177
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
178
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
179
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
180
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
181
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
182
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
183
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
184
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
185
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
186
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
187
|
+
} ? 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 {
|
|
188
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
189
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
190
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
191
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
192
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
193
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
194
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
195
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
196
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
197
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
198
|
+
} ? 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 {
|
|
199
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
200
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
201
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
202
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
203
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
204
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
205
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
206
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
207
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
208
|
+
} ? 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 {
|
|
209
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
210
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
211
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
212
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
213
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
214
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
215
|
+
(event: infer E6, listener: (...args: infer A6) => 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> : 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: string, listener: (...args: any[]) => void): any;
|
|
225
|
+
} ? 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 {
|
|
226
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
227
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
228
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
229
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
230
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
231
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
232
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> : TEvent extends {
|
|
233
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
234
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
235
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
236
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
237
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
238
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> : TEvent extends {
|
|
239
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
240
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
241
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
242
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
243
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> : TEvent extends {
|
|
244
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
245
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
246
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
247
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> : TEvent extends {
|
|
248
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
249
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
250
|
+
} ? TransformedEvent<TThis, E0, A0> : TransformedEvent<TThis, string, any[]>;
|
|
251
|
+
//# sourceMappingURL=events.d.ts.map
|