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
I found an odd case while I was writing some documentation for the MSW bindings I maintain:
/**
Creates a handler that intercepts any HTTP request method for the given URL pattern.
https://mswjs.io/docs/api/http/all
\```rescript
MSW.Http.all(
#URL("/api/*"), // <- this is the issue
async ({ request, cookies, params }) => {
MSW.HttpResponse.text("Intercepted any method", {status: 200})
}
)
\```
*/
Which produces the following syntax error:
Syntax error!
/.../rescript-msw/src/MSW__Http.res:23:1-311:0
21 │ }
22 │
23 │ /**
24 │ Creates a handler that intercepts any HTTP request method for the give
│ n URL pattern.
. │ ...
310 │ ) => MSW__Common.requestHandler = "options"
311 │
This comment seems to be missing a closing `*/`
Thank you for filing! Check list:
I found an odd case while I was writing some documentation for the MSW bindings I maintain:
Which produces the following syntax error:
As a minimal example:
Playground link
This is valid javascript / typescript so I'd expect this to work, and also the error message was a little confusing.