Packages > @fluidframework/core-interfaces
@fluidframework/core-interfaces Package
Interfaces
Interface | Alerts | Description |
---|---|---|
IFluidCodeDetails |
DEPRECATED
|
|
IFluidCodeDetailsComparer |
DEPRECATED
|
|
IFluidCodeDetailsConfig |
DEPRECATED
|
|
IFluidHandle | Handle to a shared FluidObject | |
IFluidHandleContext | An IFluidHandleContext describes a routing context from which other IFluidHandleContexts are defined | |
IFluidLoadable | A shared FluidObject has a URL from which it can be referenced | |
IFluidObject |
DEPRECATED
|
|
IFluidPackage |
DEPRECATED
|
|
IFluidPackageEnvironment |
DEPRECATED
|
|
IFluidRouter | ||
IFluidRunnable | ||
IProvideFluidCodeDetailsComparer |
DEPRECATED
|
|
IProvideFluidHandle | ||
IProvideFluidHandleContext | ||
IProvideFluidLoadable | ||
IProvideFluidRouter | Request routing | |
IProvideFluidRunnable | ||
IRequest | ||
IRequestHeader | ||
IResponse |
Types
TypeAlias | Description |
---|---|
FluidObject |
This utility type take interface(s) that follow the FluidObject pattern, and produces a new type that can be used for inspection and discovery of those interfaces. It is meant to be used with types that are known to implement the FluidObject pattern. A common way to specify a type implements the FluidObject pattern is to expose it as a FluidObject without a generic argument. For example, if we have an interface like below
interface IProvideFoo{
and a function that returns a FluidObject. You would do the following
Either IFoo or IProvideFoo are valid generic arguments. In both case maybeFoo will be of type
You can inspect multiple types via a intersection. For example: |
FluidObjectKeys | This utility type creates a type that is the union of all keys on the generic type which implement the FluidObject pattern. |
Variables
Variable | Alerts | Description |
---|---|---|
IFluidCodeDetailsComparer |
DEPRECATED
|
|
IFluidHandle | ||
IFluidHandleContext | ||
IFluidLoadable | ||
IFluidRouter | ||
IFluidRunnable | ||
isFluidCodeDetails |
DEPRECATED
|
|
isFluidPackage |
DEPRECATED
|
Type Details
FluidObject
This utility type take interface(s) that follow the FluidObject pattern, and produces a new type that can be used for inspection and discovery of those interfaces.
It is meant to be used with types that are known to implement the FluidObject pattern. A common way to specify a type implements the FluidObject pattern is to expose it as a FluidObject without a generic argument.
For example, if we have an interface like below
interface IProvideFoo{
IFoo: IFoo
}
interface IFoo extends IProvideFoo{
foobar();
}
and a function that returns a FluidObject. You would do the following
const maybeFoo: FluidObject<IFoo> = getFluidObject()
;
Either IFoo or IProvideFoo are valid generic arguments. In both case maybeFoo will be of type {IFoo?: IFoo}
. If IFoo is not undefined, then the FluidObject provides IFoo, and it can be used.
You can inspect multiple types via a intersection. For example: FluidObject<IFoo & IBar>
Signature
export declare type FluidObject<T = unknown> = {
[P in FluidObjectProviderKeys<T>]?: T[P];
};
FluidObjectKeys
This utility type creates a type that is the union of all keys on the generic type which implement the FluidObject pattern.
Signature
export declare type FluidObjectKeys<T> = keyof FluidObject<T>;
See Also
FluidObject
For example FluidObjectKeys<IFoo & IBar>
would result in "IFoo" | "IBar"
Variable Details
IFluidCodeDetailsComparer
API This
in favor of @fluidframework/container-definitions/fluidPackage.ts#IFluidCodeDetailsComparer to have code loading modules in same package.
Signature
IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer
IFluidHandle
Signature
IFluidHandle: keyof IProvideFluidHandle
IFluidHandleContext
Signature
IFluidHandleContext: keyof IProvideFluidHandleContext
IFluidLoadable
Signature
IFluidLoadable: keyof IProvideFluidLoadable
IFluidRouter
Signature
IFluidRouter: keyof IProvideFluidRouter
IFluidRunnable
Signature
IFluidRunnable: keyof IProvideFluidRunnable
isFluidCodeDetails
API This
in favor of @fluidframework/container-definitions/fluidPackage.ts#isFluidCodeDetails to have code loading modules in same package
Signature
isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>
isFluidPackage
API This
in favor of @fluidframework/container-definitions/fluidPackage.ts#isFluidPackage to have code loading modules in same package. Check if the package.json defines a Fluid package
Signature
isFluidPackage: (pkg: any) => pkg is Readonly<IFluidPackage>