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

Improved typings #3302

Merged
merged 5 commits into from
Mar 9, 2023
Merged

Improved typings #3302

merged 5 commits into from
Mar 9, 2023

Conversation

djindjic
Copy link
Contributor

Description

With this PR on docs I would actually like to confirm if this is the proper way of typing plugin dependencies.

Passing this first param to CoreSetup generic would set a proper type to depsStart returned from core.getStartServices()

Passing this first param to `CoreSetup` generic would set a proper type to `depsStart` returned from `core.getStartServices()`

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>
joshuarrrr
joshuarrrr previously approved these changes Feb 7, 2023
Copy link
Member

@joshuarrrr joshuarrrr left a comment

Choose a reason for hiding this comment

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

@djindjic Thanks for the contribution! This is the correct type usage we want.

The only suggestion I have is to rename both L174 and 188 from MyPluginDepsStart to MyPluginStartDeps, which is more conventional and would better match the other examples in this doc.

@joshuarrrr joshuarrrr added the Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry label Feb 7, 2023
AMoo-Miki and others added 2 commits March 7, 2023 16:57
Signed-off-by: Josh Romero <rmerqg@amazon.com>
@joshuarrrr joshuarrrr merged commit c35dadb into opensearch-project:main Mar 9, 2023
@joshuarrrr
Copy link
Member

Thanks @djindjic !

opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 9, 2023
* Improved typings

Passing this first param to `CoreSetup` generic would set a proper type to `depsStart` returned from `core.getStartServices()`

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* Nit - rename example deps prop

Signed-off-by: Josh Romero <rmerqg@amazon.com>

---------

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>
Signed-off-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: Miki <miki@amazon.com>
(cherry picked from commit c35dadb)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
joshuarrrr added a commit that referenced this pull request Mar 9, 2023
* Improved typings

Passing this first param to `CoreSetup` generic would set a proper type to `depsStart` returned from `core.getStartServices()`



* Nit - rename example deps prop



---------





(cherry picked from commit c35dadb)

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>
Signed-off-by: Josh Romero <rmerqg@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: Miki <miki@amazon.com>
sikhote pushed a commit to sikhote/OpenSearch-Dashboards that referenced this pull request Apr 24, 2023
* Improved typings

Passing this first param to `CoreSetup` generic would set a proper type to `depsStart` returned from `core.getStartServices()`

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* Nit - rename example deps prop

Signed-off-by: Josh Romero <rmerqg@amazon.com>

---------

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>
Signed-off-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: Miki <miki@amazon.com>
Signed-off-by: David Sinclair <david@sinclair.tech>
sikhote pushed a commit to sikhote/OpenSearch-Dashboards that referenced this pull request Apr 24, 2023
* Improved typings

Passing this first param to `CoreSetup` generic would set a proper type to `depsStart` returned from `core.getStartServices()`

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* Nit - rename example deps prop

Signed-off-by: Josh Romero <rmerqg@amazon.com>

---------

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>
Signed-off-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: Miki <miki@amazon.com>
Signed-off-by: David Sinclair <david@sinclair.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry v2.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants