-
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
[Canvas] Cleanup types in lib #94517
Conversation
Pinging @elastic/kibana-presentation (Team:Presentation) |
image: resolveWithMissingImage(args.image, elasticOutline), | ||
emptyImage: resolveWithMissingImage(args.emptyImage), | ||
image: resolveWithMissingImage(args.image, elasticOutline) as string, | ||
emptyImage: resolveWithMissingImage(args.emptyImage) as string, |
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.
probably resolveWithMissingImage
should return strings only instead of string | null
? I left the current behavior since it's to be desirable according to the unit tests.
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.
Agree, that should be cleaned up.
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 👍
@@ -52,7 +50,7 @@ export interface CanvasRenderable { | |||
state: 'ready' | 'error'; | |||
value: { | |||
as: string; | |||
containerStyle: ContainerStyle; | |||
containerStyle: any; |
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.
Is this ContainerStyle
type not importable from somewhere?
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 comment says // @ts-expect-error Unlinked Webpack Type
. No idea what it means, but tsc
uses any
instead
image: resolveWithMissingImage(args.image, elasticOutline), | ||
emptyImage: resolveWithMissingImage(args.emptyImage), | ||
image: resolveWithMissingImage(args.image, elasticOutline) as string, | ||
emptyImage: resolveWithMissingImage(args.emptyImage) as string, |
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.
Agree, that should be cleaned up.
💚 Build SucceededMetrics [docs]Page load bundle
History
To update your PR or re-run it, just comment with: |
* fix get_legend_config error in canvas/lib/index * convert resolve_dataurl to ts to fix canvas/lib/index failure * convert expression_form_handler to ts to fix canvas/lib/index failure * convert canvas lib/error into ts * canvas: do not compile json file due to effect on performance * remove type. it is not exported and inferred as any implicitly * fix datatable error in lib/index.d.ts file * fix url resolver * case manually to avoid incompatibility error
* fix get_legend_config error in canvas/lib/index * convert resolve_dataurl to ts to fix canvas/lib/index failure * convert expression_form_handler to ts to fix canvas/lib/index failure * convert canvas lib/error into ts * canvas: do not compile json file due to effect on performance * remove type. it is not exported and inferred as any implicitly * fix datatable error in lib/index.d.ts file * fix url resolver * case manually to avoid incompatibility error Co-authored-by: Mikhail Shustov <restrry@gmail.com>
Summary
Extracted from #92175
Fixes TS errors in Canvas code that start failing when tests import generated
d.ts
files.