-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[new-platform] Improve naming and consistency in Plugin types #34725
[new-platform] Improve naming and consistency in Plugin types #34725
Conversation
Pinging @elastic/kibana-platform |
1c68c59
to
a8b8d3f
Compare
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great.
💚 Build Succeeded |
💔 Build Failed |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last two dependency
parameters aren't as critical as the public API, but would be nice to have these consistent too.
src/core/public/plugins/plugin.ts
Outdated
@@ -84,7 +84,7 @@ export class PluginWrapper< | |||
* @param dependencies The dictionary where the key is the dependency name and the value | |||
* is the contract returned by the dependency's `setup` function. | |||
*/ | |||
public async setup(setupContext: PluginSetupContext, dependencies: TDependenciesSetup) { | |||
public async setup(setupContext: PluginSetupContext, dependencies: TPluginsSetup) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not as critical as the public API, but probably worth making this dependency
paramater consistent too
src/core/server/plugins/plugin.ts
Outdated
@@ -176,7 +189,7 @@ export class Plugin< | |||
* @param dependencies The dictionary where the key is the dependency name and the value | |||
* is the contract returned by the dependency's `setup` function. | |||
*/ | |||
public async setup(setupContext: PluginSetupContext, dependencies: TDependenciesSetup) { | |||
public async setup(setupContext: PluginSetupContext, dependencies: TPluginsSetup) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another dependency
parameter
💚 Build Succeeded |
Summary
This improves the naming and consistency of the types for the
PluginService
s between the public and server versions.Plugin
interface for server plugins.setup
can return a Promise for server plugins.