mattpocock / ts-error-translator

VSCode extension to turn TypeScript errors into plain English
https://ts-error-translator.vercel.app
2.38k stars 90 forks source link

docs: create translation for error 2820 #132

Closed victorpatru closed 1 year ago

victorpatru commented 2 years ago

Adding error translation and example for TS Error 2820

changeset-bot[bot] commented 2 years ago

⚠️ No Changeset found

Latest commit: 98b12059f57829ad927462389ab451360b82991c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
ts-error-translator ✅ Ready (Inspect) Visit Preview Oct 6, 2022 at 6:30PM (UTC)
KutnerUri commented 1 year ago

Original seems straightforward enough.

Also you can simplify your example like this:

type Role = 'admin' | 'user' | 'super-admin';
const defaultRole: Role = 'admiiin';

great example!