-
Notifications
You must be signed in to change notification settings - Fork 842
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
EuiModal, EuiConfirmModal: converted to Typescript #2742
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
I need some help with the test. By now I'm not getting pass this error here:
Any clues? Perhaps something to do with my defined types... Other thig worth mentioning is that I had to |
When I have performed TypeScript conversions, I've often removed |
Hi @pugnascotia Does that mean that I should also remove the |
It's pretty simple, see this example, but let me know if you need any help. There's also the Jest mock functions documentation. You could then remove |
I think I managed to remove |
@ffknob the problem is in @@ -1151,7 +1157,7 @@ const typeDefinitionExtractors = {
*/
VariableDeclaration: node => {
return node.declarations.reduce((declarations, declaration) => {
- if (declaration.init.type === 'ObjectExpression') {
+ if (declaration.init != null && declaration.init.type === 'ObjectExpression') {
declarations.push({
name: declaration.id.name,
definition: declaration.init, @chandlerprall does the above change seem reasonable? The script seems to be failing on a line like: let onConfirm: any; |
… babel plugin; wrapped EuiConfirmModal tests in a describe block; changed two any types to jest.Mock
Threw a pull request at @ffknob's branch - ffknob#3 It contains the empty variable declaration fix from @pugnascotia (thanks for debugging that, Rory!), updates the |
Couple updates for EuiConfirmModal PR
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.
Just need to rebase/merge master, I think |
Just merged with master... hope I got it all right. Thanks for the help! |
jenkins test this |
Summary
Closes #2662
Converted
EuiModal
andEuiConfirmModal
to Typescript.Checklist