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

improve types #12

Merged
merged 6 commits into from
Jun 15, 2020
Merged

improve types #12

merged 6 commits into from
Jun 15, 2020

Conversation

kotarella1110
Copy link
Member

No description provided.

@@ -31,7 +20,7 @@ const parseErrorSchema = (
currentPath,
validateAllFieldCriteria,
previous,
type,
type!,
Copy link
Member Author

Choose a reason for hiding this comment

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

@bluebill1049 type may be undefined.
using ! to ignore type errors, how should I fix this?

Copy link
Member

Choose a reason for hiding this comment

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

maybe we should omit the type if it can be undefined? your thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

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

@bluebill1049 If we omit type, I think you need to fix FieldError type as follows.

 export type FieldError = {
-  type: string;
+  type?: string;
   ref?: Ref;
   types?: MultipleFieldErrors;
   message?: Message;
   isManual?: boolean;
 }

I think it's better to use an empty string ('') to avoid this fix.

Copy link
Member

Choose a reason for hiding this comment

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

oh that's right, let's leave as ''

Copy link
Member Author

Choose a reason for hiding this comment

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

I will fix this!

@kotarella1110 kotarella1110 changed the base branch from master to improve-build-setting June 15, 2020 06:19
@@ -41,7 +30,7 @@ const parseErrorSchema = (
type,
...(validateAllFieldCriteria
? {
types: { [type]: message || true },
types: { [type!]: message || true },
Copy link
Member Author

Choose a reason for hiding this comment

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

Same as above

Copy link
Member

@bluebill1049 bluebill1049 left a comment

Choose a reason for hiding this comment

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

looks good, you want to publish a new patch?

@kotarella1110
Copy link
Member Author

Yes, I want to release a new patch!

@bluebill1049
Copy link
Member

make sure push the tag and leave a release note as well :) 👍

@kotarella1110
Copy link
Member Author

What about the version?
1.0.0-beta.0 OK?

@bluebill1049
Copy link
Member

bluebill1049 commented Jun 15, 2020

we can go v1.0.0 if you are confident(this will be final release to work with v6).

@kotarella1110
Copy link
Member Author

I will release 0.0.4-beta.0 👍

Copy link
Member

@bluebill1049 bluebill1049 left a comment

Choose a reason for hiding this comment

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

just release a real version

npm version patch 0.0.4 👍

@kotarella1110
Copy link
Member Author

kotarella1110 commented Jun 15, 2020

@bluebill1049 OK! I will do it.

@kotarella1110 kotarella1110 merged commit 57795af into improve-build-setting Jun 15, 2020
@kotarella1110 kotarella1110 deleted the improve-types branch June 15, 2020 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants