@fluidframework/core-interfaces
Advanced tools
Comparing version 1.1.0 to 1.2.0-77818
@@ -6,8 +6,8 @@ /*! | ||
/** | ||
* @internal | ||
* This utility type is meant for internal use by @see FluidObject | ||
* This utility type is meant for internal use by {@link FluidObject} | ||
* Produces a valid FluidObject key given a type and a property. | ||
* A valid FluidObject key is a property that exists on the incoming type | ||
* as well as on the type of the property itself. For example, IProvideFoo.IFoo.IFoo | ||
* as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo` | ||
* This aligns with the FluidObject pattern expected to be used with all FluidObjects. | ||
* | ||
* For example: | ||
@@ -24,2 +24,4 @@ * ``` | ||
* to FluidObject pattern | ||
* | ||
* @internal | ||
*/ | ||
@@ -62,4 +64,6 @@ export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never; | ||
* This utility type creates a type that is the union of all keys on the generic type | ||
* which implement the FluidObject pattern. @see FluidObject | ||
* which implement the FluidObject pattern. | ||
* | ||
* See {@link FluidObject} | ||
* | ||
* For example `FluidObjectKeys<IFoo & IBar>` would result in `"IFoo" | "IBar"` | ||
@@ -66,0 +70,0 @@ * |
@@ -6,8 +6,8 @@ /*! | ||
/** | ||
* @internal | ||
* This utility type is meant for internal use by @see FluidObject | ||
* This utility type is meant for internal use by {@link FluidObject} | ||
* Produces a valid FluidObject key given a type and a property. | ||
* A valid FluidObject key is a property that exists on the incoming type | ||
* as well as on the type of the property itself. For example, IProvideFoo.IFoo.IFoo | ||
* as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo` | ||
* This aligns with the FluidObject pattern expected to be used with all FluidObjects. | ||
* | ||
* For example: | ||
@@ -24,2 +24,4 @@ * ``` | ||
* to FluidObject pattern | ||
* | ||
* @internal | ||
*/ | ||
@@ -62,4 +64,6 @@ export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never; | ||
* This utility type creates a type that is the union of all keys on the generic type | ||
* which implement the FluidObject pattern. @see FluidObject | ||
* which implement the FluidObject pattern. | ||
* | ||
* See {@link FluidObject} | ||
* | ||
* For example `FluidObjectKeys<IFoo & IBar>` would result in `"IFoo" | "IBar"` | ||
@@ -66,0 +70,0 @@ * |
{ | ||
"name": "@fluidframework/core-interfaces", | ||
"version": "1.1.0", | ||
"version": "1.2.0-77818", | ||
"description": "Fluid object interfaces", | ||
@@ -43,3 +43,3 @@ "homepage": "https://fluidframework.com", | ||
"@fluidframework/build-tools": "^0.2.74327", | ||
"@fluidframework/core-interfaces-previous": "npm:@fluidframework/core-interfaces@^1.0.0", | ||
"@fluidframework/core-interfaces-previous": "npm:@fluidframework/core-interfaces@1.1.0", | ||
"@fluidframework/eslint-config-fluid": "^0.28.2000", | ||
@@ -57,5 +57,5 @@ "@microsoft/api-extractor": "^7.22.2", | ||
"typeValidation": { | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"broken": {} | ||
} | ||
} |
@@ -7,8 +7,8 @@ /*! | ||
/** | ||
* @internal | ||
* This utility type is meant for internal use by @see FluidObject | ||
* This utility type is meant for internal use by {@link FluidObject} | ||
* Produces a valid FluidObject key given a type and a property. | ||
* A valid FluidObject key is a property that exists on the incoming type | ||
* as well as on the type of the property itself. For example, IProvideFoo.IFoo.IFoo | ||
* as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo` | ||
* This aligns with the FluidObject pattern expected to be used with all FluidObjects. | ||
* | ||
* For example: | ||
@@ -25,4 +25,6 @@ * ``` | ||
* to FluidObject pattern | ||
* | ||
* @internal | ||
*/ | ||
export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = | ||
export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = | ||
string extends TProp ? never : number extends TProp? never : // exclude indexers [key:string |number]: any | ||
@@ -65,3 +67,3 @@ TProp extends keyof Required<T>[TProp] // TProp is a property of T, and T[TProp] | ||
*/ | ||
export type FluidObject<T = unknown> = { | ||
export type FluidObject<T = unknown> = { | ||
[P in FluidObjectProviderKeys<T>]?: T[P]; | ||
@@ -72,4 +74,6 @@ }; | ||
* This utility type creates a type that is the union of all keys on the generic type | ||
* which implement the FluidObject pattern. @see FluidObject | ||
* which implement the FluidObject pattern. | ||
* | ||
* See {@link FluidObject} | ||
* | ||
* For example `FluidObjectKeys<IFoo & IBar>` would result in `"IFoo" | "IBar"` | ||
@@ -76,0 +80,0 @@ * |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
152315
1420
1