Convert EuiToast to TypeScript#2032
Conversation
| @@ -1,14 +1,13 @@ | |||
| import React from 'react'; | |||
| import { render, mount } from 'enzyme'; | |||
| import sinon from 'sinon'; | |||
chandlerprall
left a comment
There was a problem hiding this comment.
One small change requested, approving to not block merging.
src/components/toast/toast.tsx
Outdated
| }); | ||
|
|
||
| let headerIcon; | ||
| let headerIcon: ReactElement<typeof EuiIcon>; |
There was a problem hiding this comment.
ReactElement's signature takes props as the first arg, then the component constructor. This should be ReactElement<PropsOf<EuiIcon>, typeof EuiIcon> (PropsOf from EUI's common.ts). However, the argument defaults are fine and this can be simplified to let headerIcon: ReactElement;
0fd863e to
82a05a8
Compare
|
@pugnascotia, I'm sorry, have you just rename global_toast_list snapshot without updating? I'm not sure when and why I started getting this. |
|
Those aren't snapshot errors. Strange though - I couldn't have merged if CI wasn't passing. Are you seeing that on master, or another branch? |
Hm. Seems that merging master into my branch solved the issue, strange. Anyway, thanks 🙏 |
|
That's a known flaky test in our suite #1999 |
Summary
Convert EuiToast to TypeScript.
Checklist