mswjs / msw

Industry standard API mocking for JavaScript.
https://mswjs.io
MIT License
15.97k stars 519 forks source link

TS1005: ',' expected. #2358

Closed GonEbal closed 1 week ago

GonEbal commented 1 week ago

Prerequisites

Environment check

Browsers

Chromium (Chrome, Brave, etc.)

Reproduction repository

https://github.com/mswjs/examples

Reproduction steps

I followed these steps to set up msw in storybook: https://storybook.js.org/docs/writing-stories/mocking-data-and-modules/mocking-network-requests

Current behavior

Getting TS1005: ',' expected. errors.

Versions: Global: npm: 8.19.2 node: 18.12.0 Repo: "typescript": "4.4.4" "msw": "2.6.4" "msw-storybook-addon": "2.0.4"

Screenshot 2024-11-14 at 12 19 19 PM

Expected behavior

TS1005: ',' expected. errors should not be present

kettanaito commented 1 week ago

Hi, @GonEbal. Thanks for reporting this.

MSW requires TypeScript 4.8 and higher, you seem to be using TS 4.4, which has reached end-of-life. Please upgrade the TypeScript version and have the issue solved.

GonEbal commented 6 days ago

Thanks! That resolves the issue! Also needed to update ts-loader to work with 4.8 TypeScript version

kettanaito commented 5 days ago

@GonEbal, great job! Glad that helped.