You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Include more JS primitives for Untagged variants #7147
Blob is a part of Web API (File API spec), not a JS primitive.
It is actually an outer class and has more complex semantics at the prototype level than JS primitives. Handling this safely will add tons of complexity to the compiler.
As we discussed before (rescript-lang/rescript-core#240), I think it's not a good long-term direction for the compiler to add specializations for specific environments, because it bloats the compiler code, reduces configurability, and limits future enhancements.
If it cannot be extended in a generalized way, it should be kept to a minimum as possible.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Activity
nojaf commentedon Nov 13, 2024
I'm hitting the limitations of
@unboxedagain for https://github.com/rescript-lang/experimental-rescript-webapi/pull/7/files#r1839785692Modelling https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle
It should be something like
It would be great if I can input some sort of check for the unboxed via attribute, something like:
| @check("$0 instanceof CanvasGradient") Gradient(canvasGradient)// where $0 is the object in place.cometkim commentedon Mar 18, 2025
Blobis a part of Web API (FileAPI spec), not a JS primitive.It is actually an outer class and has more complex semantics at the prototype level than JS primitives. Handling this safely will add tons of complexity to the compiler.
As we discussed before (rescript-lang/rescript-core#240), I think it's not a good long-term direction for the compiler to add specializations for specific environments, because it bloats the compiler code, reduces configurability, and limits future enhancements.
If it cannot be extended in a generalized way, it should be kept to a minimum as possible.
github-actions commentedon May 1, 2026
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Declare the runtime class or typeof of types, and annotate the stdlib (…
Declare the runtime class or typeof of types, and annotate the stdlib (…