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

[8.x] More strict plugin type definitions (#205232) #205778

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

Stricter defaults for plugin types: `Plugin` and `CoreSetup` now have
empty objects as defaults instead of `object` which is assignable to
anything basically. This catches some type errors, but my motivation for
this is to allow something like:

```ts
function createPlugin ():Plugin<MySetupContract, MyStartContract, MySetupDependencies, MyStartDependencies> {
	return {
		// look ma, no additional typing necessary
		setup ( coreSetup, pluginsSetup ) {
		},
		start ( coreStart, pluginsStart ) {
		}
	}
}
```

(cherry picked from commit 98ce312)
@kibanamachine kibanamachine enabled auto-merge (squash) January 7, 2025 15:46
@botelastic botelastic bot added the Team:obs-ux-management Observability Management User Experience Team label Jan 7, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@kibanamachine kibanamachine merged commit 833ef86 into elastic:8.x Jan 7, 2025
13 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
taskManager 64 63 -1

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
taskManager 7 8 +1
Unknown metric groups

API count

id before after diff
taskManager 108 107 -1

cc @dgieselaar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:obs-ux-management Observability Management User Experience Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants