@fluidframework/core-interfaces 2.0.0-dev.7.4.0.216897 → 2.0.0-dev.7.4.0.217212
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/api-report/core-interfaces.api.md +32 -24
- package/dist/config.d.ts +35 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +7 -0
- package/dist/config.js.map +1 -0
- package/dist/core-interfaces-alpha.d.ts +511 -38
- package/dist/core-interfaces-beta.d.ts +4 -0
- package/dist/core-interfaces-public.d.ts +4 -0
- package/dist/core-interfaces-untrimmed.d.ts +59 -26
- package/dist/disposable.d.ts +1 -1
- package/dist/disposable.js.map +1 -1
- package/dist/error.d.ts +2 -1
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js.map +1 -1
- package/dist/events.d.ts +8 -8
- package/dist/events.js.map +1 -1
- package/dist/fluidRouter.d.ts +6 -6
- package/dist/fluidRouter.js +1 -1
- package/dist/fluidRouter.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +8 -8
- package/dist/logger.js +1 -1
- package/dist/logger.js.map +1 -1
- package/dist/provider.d.ts +2 -2
- package/dist/provider.js.map +1 -1
- package/lib/config.d.ts +35 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +6 -0
- package/lib/config.js.map +1 -0
- package/lib/core-interfaces-alpha.d.ts +511 -38
- package/lib/core-interfaces-beta.d.ts +4 -0
- package/lib/core-interfaces-public.d.ts +4 -0
- package/lib/core-interfaces-untrimmed.d.ts +59 -26
- package/lib/disposable.d.ts +1 -1
- package/lib/disposable.js.map +1 -1
- package/lib/error.d.ts +2 -1
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js.map +1 -1
- package/lib/events.d.ts +8 -8
- package/lib/events.js.map +1 -1
- package/lib/fluidRouter.d.ts +6 -6
- package/lib/fluidRouter.js +1 -1
- package/lib/fluidRouter.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/logger.d.ts +8 -8
- package/lib/logger.js +1 -1
- package/lib/logger.js.map +1 -1
- package/lib/provider.d.ts +2 -2
- package/lib/provider.js.map +1 -1
- package/package.json +1 -1
- package/src/config.ts +36 -0
- package/src/disposable.ts +1 -1
- package/src/error.ts +2 -1
- package/src/events.ts +8 -8
- package/src/fluidRouter.ts +6 -6
- package/src/index.ts +1 -0
- package/src/logger.ts +8 -8
- package/src/provider.ts +2 -2
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
7
|
// @internal
|
|
8
|
+
export type ConfigTypes = string | number | boolean | number[] | string[] | boolean[] | undefined;
|
|
9
|
+
|
|
10
|
+
// @alpha
|
|
8
11
|
export type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;
|
|
9
12
|
|
|
10
13
|
// @internal
|
|
@@ -19,7 +22,7 @@ export const FluidErrorTypes: {
|
|
|
19
22
|
// @internal (undocumented)
|
|
20
23
|
export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];
|
|
21
24
|
|
|
22
|
-
// @
|
|
25
|
+
// @alpha
|
|
23
26
|
export type FluidObject<T = unknown> = {
|
|
24
27
|
[P in FluidObjectProviderKeys<T>]?: T[P];
|
|
25
28
|
};
|
|
@@ -27,16 +30,21 @@ export type FluidObject<T = unknown> = {
|
|
|
27
30
|
// @internal
|
|
28
31
|
export type FluidObjectKeys<T> = keyof FluidObject<T>;
|
|
29
32
|
|
|
30
|
-
// @
|
|
33
|
+
// @alpha
|
|
31
34
|
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;
|
|
32
35
|
|
|
33
36
|
// @internal
|
|
37
|
+
export interface IConfigProviderBase {
|
|
38
|
+
getRawConfig(name: string): ConfigTypes;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// @alpha
|
|
34
42
|
export interface IDisposable {
|
|
35
43
|
dispose(error?: Error): void;
|
|
36
44
|
readonly disposed: boolean;
|
|
37
45
|
}
|
|
38
46
|
|
|
39
|
-
// @
|
|
47
|
+
// @alpha
|
|
40
48
|
export interface IErrorBase extends Partial<Error> {
|
|
41
49
|
readonly errorType: string;
|
|
42
50
|
getTelemetryProperties?(): ITelemetryBaseProperties;
|
|
@@ -45,31 +53,31 @@ export interface IErrorBase extends Partial<Error> {
|
|
|
45
53
|
readonly stack?: string;
|
|
46
54
|
}
|
|
47
55
|
|
|
48
|
-
// @
|
|
56
|
+
// @alpha
|
|
49
57
|
export interface IErrorEvent extends IEvent {
|
|
50
58
|
// @eventProperty
|
|
51
59
|
(event: "error", listener: (message: any) => void): any;
|
|
52
60
|
}
|
|
53
61
|
|
|
54
|
-
// @
|
|
62
|
+
// @alpha
|
|
55
63
|
export interface IEvent {
|
|
56
64
|
// @eventProperty
|
|
57
65
|
(event: string, listener: (...args: any[]) => void): any;
|
|
58
66
|
}
|
|
59
67
|
|
|
60
|
-
// @
|
|
68
|
+
// @alpha
|
|
61
69
|
export interface IEventProvider<TEvent extends IEvent> {
|
|
62
70
|
readonly off: IEventTransformer<this, TEvent>;
|
|
63
71
|
readonly on: IEventTransformer<this, TEvent>;
|
|
64
72
|
readonly once: IEventTransformer<this, TEvent>;
|
|
65
73
|
}
|
|
66
74
|
|
|
67
|
-
// @
|
|
75
|
+
// @alpha
|
|
68
76
|
export type IEventThisPlaceHolder = {
|
|
69
77
|
thisPlaceHolder: "thisPlaceHolder";
|
|
70
78
|
};
|
|
71
79
|
|
|
72
|
-
// @
|
|
80
|
+
// @alpha
|
|
73
81
|
export type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {
|
|
74
82
|
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
75
83
|
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
@@ -297,10 +305,10 @@ export interface IFluidPackageEnvironment {
|
|
|
297
305
|
};
|
|
298
306
|
}
|
|
299
307
|
|
|
300
|
-
// @
|
|
308
|
+
// @alpha @deprecated (undocumented)
|
|
301
309
|
export const IFluidRouter: keyof IProvideFluidRouter;
|
|
302
310
|
|
|
303
|
-
// @
|
|
311
|
+
// @alpha @deprecated (undocumented)
|
|
304
312
|
export interface IFluidRouter extends IProvideFluidRouter {
|
|
305
313
|
// (undocumented)
|
|
306
314
|
request(request: IRequest): Promise<IResponse>;
|
|
@@ -353,7 +361,7 @@ export interface IProvideFluidLoadable {
|
|
|
353
361
|
readonly IFluidLoadable: IFluidLoadable;
|
|
354
362
|
}
|
|
355
363
|
|
|
356
|
-
// @
|
|
364
|
+
// @alpha @deprecated
|
|
357
365
|
export interface IProvideFluidRouter {
|
|
358
366
|
// (undocumented)
|
|
359
367
|
readonly IFluidRouter: IFluidRouter;
|
|
@@ -365,7 +373,7 @@ export interface IProvideFluidRunnable {
|
|
|
365
373
|
readonly IFluidRunnable: IFluidRunnable;
|
|
366
374
|
}
|
|
367
375
|
|
|
368
|
-
// @
|
|
376
|
+
// @alpha (undocumented)
|
|
369
377
|
export interface IRequest {
|
|
370
378
|
// (undocumented)
|
|
371
379
|
headers?: IRequestHeader;
|
|
@@ -373,13 +381,13 @@ export interface IRequest {
|
|
|
373
381
|
url: string;
|
|
374
382
|
}
|
|
375
383
|
|
|
376
|
-
// @
|
|
384
|
+
// @alpha (undocumented)
|
|
377
385
|
export interface IRequestHeader {
|
|
378
386
|
// (undocumented)
|
|
379
387
|
[index: string]: any;
|
|
380
388
|
}
|
|
381
389
|
|
|
382
|
-
// @
|
|
390
|
+
// @alpha (undocumented)
|
|
383
391
|
export interface IResponse {
|
|
384
392
|
// (undocumented)
|
|
385
393
|
headers?: {
|
|
@@ -409,7 +417,7 @@ export interface ITaggedTelemetryPropertyType {
|
|
|
409
417
|
value: TelemetryEventPropertyType;
|
|
410
418
|
}
|
|
411
419
|
|
|
412
|
-
// @
|
|
420
|
+
// @alpha
|
|
413
421
|
export interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
|
|
414
422
|
// (undocumented)
|
|
415
423
|
category: string;
|
|
@@ -417,7 +425,7 @@ export interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
|
|
|
417
425
|
eventName: string;
|
|
418
426
|
}
|
|
419
427
|
|
|
420
|
-
// @
|
|
428
|
+
// @alpha
|
|
421
429
|
export interface ITelemetryBaseLogger {
|
|
422
430
|
// (undocumented)
|
|
423
431
|
minLogLevel?: LogLevel;
|
|
@@ -425,7 +433,7 @@ export interface ITelemetryBaseLogger {
|
|
|
425
433
|
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
|
|
426
434
|
}
|
|
427
435
|
|
|
428
|
-
// @
|
|
436
|
+
// @alpha
|
|
429
437
|
export type ITelemetryBaseProperties = ITelemetryProperties;
|
|
430
438
|
|
|
431
439
|
// @internal @deprecated
|
|
@@ -456,7 +464,7 @@ export interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {
|
|
|
456
464
|
duration?: number;
|
|
457
465
|
}
|
|
458
466
|
|
|
459
|
-
// @
|
|
467
|
+
// @alpha @deprecated
|
|
460
468
|
export interface ITelemetryProperties {
|
|
461
469
|
// (undocumented)
|
|
462
470
|
[index: string]: TelemetryEventPropertyType | Tagged<TelemetryEventPropertyType>;
|
|
@@ -474,22 +482,22 @@ export interface IUsageError extends IErrorBase {
|
|
|
474
482
|
readonly errorType: typeof FluidErrorTypes.usageError;
|
|
475
483
|
}
|
|
476
484
|
|
|
477
|
-
// @
|
|
485
|
+
// @alpha
|
|
478
486
|
export const LogLevel: {
|
|
479
487
|
readonly verbose: 10;
|
|
480
488
|
readonly default: 20;
|
|
481
489
|
readonly error: 30;
|
|
482
490
|
};
|
|
483
491
|
|
|
484
|
-
// @
|
|
492
|
+
// @alpha
|
|
485
493
|
export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
486
494
|
|
|
487
|
-
// @
|
|
495
|
+
// @alpha
|
|
488
496
|
export type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {
|
|
489
497
|
[K in keyof L]: L[K] extends IEventThisPlaceHolder ? TThis : L[K];
|
|
490
498
|
} : L;
|
|
491
499
|
|
|
492
|
-
// @
|
|
500
|
+
// @alpha
|
|
493
501
|
export interface Tagged<V, T extends string = string> {
|
|
494
502
|
// (undocumented)
|
|
495
503
|
tag: T;
|
|
@@ -503,10 +511,10 @@ export type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;
|
|
|
503
511
|
// @internal @deprecated
|
|
504
512
|
export type TelemetryEventCategory = "generic" | "error" | "performance";
|
|
505
513
|
|
|
506
|
-
// @
|
|
514
|
+
// @alpha @deprecated
|
|
507
515
|
export type TelemetryEventPropertyType = string | number | boolean | undefined;
|
|
508
516
|
|
|
509
|
-
// @
|
|
517
|
+
// @alpha
|
|
510
518
|
export type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
|
|
511
519
|
|
|
512
520
|
// (No @packageDocumentation comment for this package)
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Types supported by {@link IConfigProviderBase}.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export type ConfigTypes = string | number | boolean | number[] | string[] | boolean[] | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Base interface for providing configurations to enable/disable/control features.
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export interface IConfigProviderBase {
|
|
15
|
+
/**
|
|
16
|
+
* For the specified config name this function gets the value.
|
|
17
|
+
*
|
|
18
|
+
* This type is meant be easy to implement by Fluid Framework consumers
|
|
19
|
+
* so the returned valued needs minimal type coercion, and allows consumers to
|
|
20
|
+
* return values in a natural way from whatever source they retrieve them.
|
|
21
|
+
*
|
|
22
|
+
* For instance a value of 1 maybe be returned as a string or a number.
|
|
23
|
+
* For array types a json string or an object are allowable.
|
|
24
|
+
*
|
|
25
|
+
* It should return undefined if there is no value available for the config name.
|
|
26
|
+
*
|
|
27
|
+
* @param name - The name of the config to get the value for.
|
|
28
|
+
*
|
|
29
|
+
* @privateRemarks Generally, this type should only be taken as input, and be wrapped by an
|
|
30
|
+
* internal monitoring context from the fluidframework/telemetry-utils package. That will provide
|
|
31
|
+
* a wrapper with provides strongly typed access to values via consistent type coercion.
|
|
32
|
+
*/
|
|
33
|
+
getRawConfig(name: string): ConfigTypes;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,EAAE,GAAG,SAAS,CAAC;AAElG;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IACnC;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;CACxC"}
|
package/dist/config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Types supported by {@link IConfigProviderBase}.\n * @internal\n */\nexport type ConfigTypes = string | number | boolean | number[] | string[] | boolean[] | undefined;\n\n/**\n * Base interface for providing configurations to enable/disable/control features.\n * @internal\n */\nexport interface IConfigProviderBase {\n\t/**\n\t * For the specified config name this function gets the value.\n\t *\n\t * This type is meant be easy to implement by Fluid Framework consumers\n\t * so the returned valued needs minimal type coercion, and allows consumers to\n\t * return values in a natural way from whatever source they retrieve them.\n\t *\n\t * For instance a value of 1 maybe be returned as a string or a number.\n\t * For array types a json string or an object are allowable.\n\t *\n\t * It should return undefined if there is no value available for the config name.\n\t *\n\t * @param name - The name of the config to get the value for.\n\t *\n\t * @privateRemarks Generally, this type should only be taken as input, and be wrapped by an\n\t * internal monitoring context from the fluidframework/telemetry-utils package. That will provide\n\t * a wrapper with provides strongly typed access to values via consistent type coercion.\n\t */\n\tgetRawConfig(name: string): ConfigTypes;\n}\n"]}
|