@fluidframework/core-interfaces 1.2.0-77818 → 1.2.0-78837
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/dist/provider.d.ts +4 -3
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js.map +1 -1
- package/lib/provider.d.ts +4 -3
- package/lib/provider.d.ts.map +1 -1
- package/lib/provider.js.map +1 -1
- package/package.json +1 -1
- package/src/provider.ts +4 -3
package/dist/provider.d.ts
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`
|
|
10
10
|
* This aligns with the FluidObject pattern expected to be used with all FluidObjects.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
* ```
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
14
|
* interface IProvideFoo{
|
|
15
15
|
* IFoo: IFoo
|
|
16
16
|
* }
|
|
@@ -32,8 +32,9 @@ export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T>
|
|
|
32
32
|
* A common way to specify a type implements the FluidObject pattern is to expose it as a
|
|
33
33
|
* FluidObject without a generic argument.
|
|
34
34
|
*
|
|
35
|
+
* @example
|
|
35
36
|
* For example, if we have an interface like below
|
|
36
|
-
* ```
|
|
37
|
+
* ```typescript
|
|
37
38
|
* interface IProvideFoo{
|
|
38
39
|
* IFoo: IFoo
|
|
39
40
|
* }
|
package/dist/provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,oBAAY,uBAAuB,CAAC,CAAC,EAAE,KAAK,SAAS,MAAM,CAAC,GAAG,MAAM,CAAC,IAClE,MAAM,SAAS,KAAK,GAAG,KAAK,GAAG,MAAM,SAAS,KAAK,GAAE,KAAK,GAC1D,KAAK,SAAS,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAChC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAC1D,KAAK,GACL,KAAK,GACT,KAAK,CAAC;AAEhB
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,oBAAY,uBAAuB,CAAC,CAAC,EAAE,KAAK,SAAS,MAAM,CAAC,GAAG,MAAM,CAAC,IAClE,MAAM,SAAS,KAAK,GAAG,KAAK,GAAG,MAAM,SAAS,KAAK,GAAE,KAAK,GAC1D,KAAK,SAAS,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAChC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAC1D,KAAK,GACL,KAAK,GACT,KAAK,CAAC;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,oBAAY,WAAW,CAAC,CAAC,GAAG,OAAO,IAAI;KAClC,CAAC,IAAI,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CAC3C,CAAC;AAEF;;;;;;;;GAQG;AACH,oBAAY,eAAe,CAAC,CAAC,IAAI,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.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 * This utility type is meant for internal use by {@link FluidObject}\n * Produces a valid FluidObject key given a type and a property.\n * A valid FluidObject key is a property that exists on the incoming type\n * as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`\n * This aligns with the FluidObject pattern expected to be used with all FluidObjects.\n *\n *
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.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 * This utility type is meant for internal use by {@link FluidObject}\n * Produces a valid FluidObject key given a type and a property.\n * A valid FluidObject key is a property that exists on the incoming type\n * as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`\n * This aligns with the FluidObject pattern expected to be used with all FluidObjects.\n *\n * @example\n * ```typescript\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n * This pattern enables discovery, and delegation in a standard way which is central\n * to FluidObject pattern\n *\n * @internal\n */\nexport type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> =\n string extends TProp ? never : number extends TProp? never : // exclude indexers [key:string |number]: any\n TProp extends keyof Required<T>[TProp] // TProp is a property of T, and T[TProp]\n ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] // T[TProp] is the same type as T[TProp][TProp]\n ? TProp\n : never\n : never;\n\n/**\n * This utility type take interface(s) that follow the FluidObject pattern, and produces\n * a new type that can be used for inspection and discovery of those interfaces.\n *\n * It is meant to be used with types that are known to implement the FluidObject pattern.\n * A common way to specify a type implements the FluidObject pattern is to expose it as a\n * FluidObject without a generic argument.\n *\n * @example\n * For example, if we have an interface like below\n * ```typescript\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n *\n * and a function that returns a FluidObject. You would do the following\n *\n * `const maybeFoo: FluidObject<IFoo> = getFluidObject()`;\n *\n * Either IFoo or IProvideFoo are valid generic arguments. In both case\n * maybeFoo will be of type `{IFoo?: IFoo}`. If IFoo is not undefined,\n * then the FluidObject provides IFoo, and it can be used.\n *\n * You can inspect multiple types via a intersection. For example:\n * `FluidObject<IFoo & IBar>`\n *\n */\nexport type FluidObject<T = unknown> = {\n [P in FluidObjectProviderKeys<T>]?: T[P];\n};\n\n/**\n * This utility type creates a type that is the union of all keys on the generic type\n * which implement the FluidObject pattern.\n *\n * See {@link FluidObject}\n *\n * For example `FluidObjectKeys<IFoo & IBar>` would result in `\"IFoo\" | \"IBar\"`\n *\n */\nexport type FluidObjectKeys<T> = keyof FluidObject<T>;\n"]}
|
package/lib/provider.d.ts
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`
|
|
10
10
|
* This aligns with the FluidObject pattern expected to be used with all FluidObjects.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
* ```
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
14
|
* interface IProvideFoo{
|
|
15
15
|
* IFoo: IFoo
|
|
16
16
|
* }
|
|
@@ -32,8 +32,9 @@ export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T>
|
|
|
32
32
|
* A common way to specify a type implements the FluidObject pattern is to expose it as a
|
|
33
33
|
* FluidObject without a generic argument.
|
|
34
34
|
*
|
|
35
|
+
* @example
|
|
35
36
|
* For example, if we have an interface like below
|
|
36
|
-
* ```
|
|
37
|
+
* ```typescript
|
|
37
38
|
* interface IProvideFoo{
|
|
38
39
|
* IFoo: IFoo
|
|
39
40
|
* }
|
package/lib/provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;GAo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/provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.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 * This utility type is meant for internal use by {@link FluidObject}\n * Produces a valid FluidObject key given a type and a property.\n * A valid FluidObject key is a property that exists on the incoming type\n * as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`\n * This aligns with the FluidObject pattern expected to be used with all FluidObjects.\n *\n *
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.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 * This utility type is meant for internal use by {@link FluidObject}\n * Produces a valid FluidObject key given a type and a property.\n * A valid FluidObject key is a property that exists on the incoming type\n * as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`\n * This aligns with the FluidObject pattern expected to be used with all FluidObjects.\n *\n * @example\n * ```typescript\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n * This pattern enables discovery, and delegation in a standard way which is central\n * to FluidObject pattern\n *\n * @internal\n */\nexport type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> =\n string extends TProp ? never : number extends TProp? never : // exclude indexers [key:string |number]: any\n TProp extends keyof Required<T>[TProp] // TProp is a property of T, and T[TProp]\n ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] // T[TProp] is the same type as T[TProp][TProp]\n ? TProp\n : never\n : never;\n\n/**\n * This utility type take interface(s) that follow the FluidObject pattern, and produces\n * a new type that can be used for inspection and discovery of those interfaces.\n *\n * It is meant to be used with types that are known to implement the FluidObject pattern.\n * A common way to specify a type implements the FluidObject pattern is to expose it as a\n * FluidObject without a generic argument.\n *\n * @example\n * For example, if we have an interface like below\n * ```typescript\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n *\n * and a function that returns a FluidObject. You would do the following\n *\n * `const maybeFoo: FluidObject<IFoo> = getFluidObject()`;\n *\n * Either IFoo or IProvideFoo are valid generic arguments. In both case\n * maybeFoo will be of type `{IFoo?: IFoo}`. If IFoo is not undefined,\n * then the FluidObject provides IFoo, and it can be used.\n *\n * You can inspect multiple types via a intersection. For example:\n * `FluidObject<IFoo & IBar>`\n *\n */\nexport type FluidObject<T = unknown> = {\n [P in FluidObjectProviderKeys<T>]?: T[P];\n};\n\n/**\n * This utility type creates a type that is the union of all keys on the generic type\n * which implement the FluidObject pattern.\n *\n * See {@link FluidObject}\n *\n * For example `FluidObjectKeys<IFoo & IBar>` would result in `\"IFoo\" | \"IBar\"`\n *\n */\nexport type FluidObjectKeys<T> = keyof FluidObject<T>;\n"]}
|
package/package.json
CHANGED
package/src/provider.ts
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`
|
|
11
11
|
* This aligns with the FluidObject pattern expected to be used with all FluidObjects.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
* ```
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
15
|
* interface IProvideFoo{
|
|
16
16
|
* IFoo: IFoo
|
|
17
17
|
* }
|
|
@@ -40,8 +40,9 @@ export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> =
|
|
|
40
40
|
* A common way to specify a type implements the FluidObject pattern is to expose it as a
|
|
41
41
|
* FluidObject without a generic argument.
|
|
42
42
|
*
|
|
43
|
+
* @example
|
|
43
44
|
* For example, if we have an interface like below
|
|
44
|
-
* ```
|
|
45
|
+
* ```typescript
|
|
45
46
|
* interface IProvideFoo{
|
|
46
47
|
* IFoo: IFoo
|
|
47
48
|
* }
|