-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
Description
Playing around with rescript-webapi, stuck from the beginning.
I am using this repo - https://github.com/rescript-lang/rescript-project-template
Just copy-paste code from https://github.com/tinymce/rescript-webapi/blob/main/tests/Webapi/Dom/Webapi__Dom__EventTarget__test.re this file.
Get an error on 4th line:
We've found a bug for you!
fun/rescript-project-template/src/Demo.res:4:14-21
2 │ open EventTarget;
3 │
4 │ let target = document->Document.createElement("strong")->Element.asEvent
│ Target;
5 │ let event = Event.make("my-event");
6 │ let handleClick = _ => print_endline("asd");
This has type:
Dom.document (defined as
Dom.eventTarget_like<Dom._node<Dom._document<Dom._baseClass>>>)
Somewhere wanted: string
FAILED: cannot make progress due to previous errors.
What I am doing wrong? :)
Metadata
Metadata
Assignees
Labels
No labels