Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: strict types for form events#106

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ivan-demchenko wants to merge1 commit intorescript-lang:master
base:master
Choose a base branch
Loading
fromivan-demchenko:feat/stricter-types-for-form-events

Conversation

@ivan-demchenko
Copy link

This PR makes use ofJs.Json.t instead ofobject type for form events. It addresses this issue:
#105

Context:

lettargetValueToInt= (target:Js.Json.t):int=> {// Js.Json.decodeObject(target))// and so on}// ...<inputonChange={evt=> {setIntValue(_prev=>evt->ReactEvent.Form.target->targetValueToInt);    }  }/>

@mununki
Copy link
Member

Thank you for PR!
The big difference between object and JSON is that undefined doesn't exist in JSON's specification. I'm not sure why we need to type-define form event as JSON format instead of object, can you explain further?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@ivan-demchenko@mununki

[8]ページ先頭

©2009-2025 Movatter.jp