Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FluidObject utility type to Replace IFluidObject #8087

Merged
merged 19 commits into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion common/lib/core-interfaces/api-report/core-interfaces.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export interface IFluidLoadable extends IProvideFluidLoadable {
handle: IFluidHandle;
}

// @public (undocumented)
// @public @deprecated (undocumented)
export interface IFluidObject extends Readonly<Partial<IProvideFluidLoadable & IProvideFluidRunnable & IProvideFluidRouter & IProvideFluidHandleContext & IProvideFluidConfiguration & IProvideFluidHandle & IProvideFluidSerializer>> {
}

Expand Down Expand Up @@ -213,6 +213,19 @@ export const isFluidCodeDetails: (details: unknown) => details is Readonly<IFlui
// @public
export const isFluidPackage: (pkg: any) => pkg is Readonly<IFluidPackage>;

// Warning: (ae-incompatible-release-tags) The symbol "Provider" is marked as @public, but its signature references "ProviderPropertyKeys" which is marked as @internal
//
// @public
export type Provider<T = unknown> = Partial<Pick<T, ProviderPropertyKeys<T>>>;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm considering renaming this to FluidObject, rather than Provider as i think it may make the transition easier for people.
Open to opinions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vladsud and @markfields. what do you think here. i'm actually leaning towards the rename to IFluidObject, as i think it will be a less disruptive change for people.


// @public
export type ProviderKeys<T> = keyof Provider<T>;

// Warning: (ae-internal-missing-underscore) The name "ProviderPropertyKeys" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export type ProviderPropertyKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof T[TProp] ? TProp extends keyof T[TProp][TProp] ? TProp : never : never;


// (No @packageDocumentation comment for this package)

Expand Down
Loading