Repository: mswjs/msw (ts)

Issue:
setupWorker: Types have separate declarations of a private property '__kind'
I'm trying to bump [msw](https://github.com/mswjs/msw) from 2.7.6 to 2.8.5. 

We have this code block:

```
import { setupWorker } from 'msw/browser'
import { handlers } from './server-handlers'

export const browserWorker = setupWorker(...handlers)
```

For `...handlers`, we're getting:

```
Argument of type 'HttpHandler' is not assignable to parameter of type 'RequestHandler<RequestHandlerDefaultInfo, any, any, RequestHandlerOptions> | WebSocketHandler'.
  Type 'HttpHandler' is not assignable to type 'RequestHandler<RequestHandlerDefaultInfo, any, any, RequestHandlerOptions>'.
    Types have separate declarations of a private property '__kind'.ts(2345)
```

`server-handlers.ts` looks like this:
```
const handlers = [
  // Get claim overview
  http.get<{ id: string }, Overview>(`${apiUrl}/userinfo`, async () => {
    await delay(30)
    return HttpResponse.json(mockUser, { status: 201 })
  }),
```

Any help would be much appreciated, thank you!

Pull request description:
fix(browser): set the default entrypoint to commonjs
- Fixes #2512 

Patch:
diff --git a/browser/package.json b/browser/package.json
index 8d3162b4..1ac07647 100644
--- a/browser/package.json
+++ b/browser/package.json
@@ -1,7 +1,8 @@
 {
   "type": "module",
-  "main": "../lib/browser/index.mjs",
-  "types": "../lib/browser/index.d.mts",
+  "main": "../lib/browser/index.js",
+  "module": "../lib/browser/index.mjs",
+  "types": "../lib/browser/index.d.ts",
   "exports": {
     ".": {
       "module-sync": {


Test patch:
diff --git a/test/typings/setup-server.test-d.ts b/test/typings/setup-server.test-d.ts
new file mode 100644
index 00000000..7e6f58f6
--- /dev/null
+++ b/test/typings/setup-server.test-d.ts
@@ -0,0 +1,42 @@
+import { http, HttpResponse, graphql } from 'msw'
+import { setupServer } from 'msw/node'
+
+it('does not produce a type error when called without arguments', () => {
+  setupServer()
+})
+
+it('accepts a single HTTP request handler', () => {
+  setupServer(
+    http.get('/user', () => {
+      return HttpResponse.json({ name: 'John Doe' })
+    }),
+  )
+  setupServer(
+    http.get('/user', async () => {
+      return HttpResponse.json({ name: 'John Doe' })
+    }),
+  )
+})
+
+it('accepts a single GraphQL request handler', () => {
+  setupServer(
+    graphql.query('GetUser', () => {
+      return HttpResponse.json({ data: { name: 'John Doe' } })
+    }),
+  )
+  setupServer(
+    graphql.query('GetUser', async () => {
+      return HttpResponse.json({ data: { name: 'John Doe' } })
+    }),
+  )
+})
+
+it('supports a list of request handlers defined elsewhere', () => {
+  const handlers = [
+    http.get('/user', () => {
+      return HttpResponse.json({ name: 'John Doe' })
+    }),
+  ]
+
+  setupServer(...handlers)
+})
diff --git a/test/typings/setup-worker.test-d.ts b/test/typings/setup-worker.test-d.ts
new file mode 100644
index 00000000..8313f966
--- /dev/null
+++ b/test/typings/setup-worker.test-d.ts
@@ -0,0 +1,42 @@
+import { http, HttpResponse, graphql } from 'msw'
+import { setupWorker } from 'msw/browser'
+
+it('does not produce a type error when called without arguments', () => {
+  setupWorker()
+})
+
+it('accepts a single HTTP request handler', () => {
+  setupWorker(
+    http.get('/user', () => {
+      return HttpResponse.json({ name: 'John Doe' })
+    }),
+  )
+  setupWorker(
+    http.get('/user', async () => {
+      return HttpResponse.json({ name: 'John Doe' })
+    }),
+  )
+})
+
+it('accepts a single GraphQL request handler', () => {
+  setupWorker(
+    graphql.query('GetUser', () => {
+      return HttpResponse.json({ data: { name: 'John Doe' } })
+    }),
+  )
+  setupWorker(
+    graphql.query('GetUser', async () => {
+      return HttpResponse.json({ data: { name: 'John Doe' } })
+    }),
+  )
+})
+
+it('supports a list of request handlers defined elsewhere', () => {
+  const handlers = [
+    http.get('/user', () => {
+      return HttpResponse.json({ name: 'John Doe' })
+    }),
+  ]
+
+  setupWorker(...handlers)
+})