-
Notifications
You must be signed in to change notification settings - Fork 84
fix: add support for exactOptionalPropertyTypes in type definitions
#391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add support for exactOptionalPropertyTypes in type definitions
#391
Conversation
The committers listed above are authorized under a signed CLA. |
exactOptionalPropertyTypes to type testsexactOptionalPropertyTypes in type definitions
8158703 to
9674f9f
Compare
|
Hello @sebastian-altamirano, thanks for opening a PR. Could you provide a reproducible link and your TypeScript |
|
Here's a repro https://stackblitz.com/edit/vitejs-vite-gantpukn?file=eslint.config.mjs,tsconfig.json&view=editor I'm not sure why the StackBlitz IDE doesn't display the error, but if you run |
|
@sebastian-altamirano please open an issue on https://github.com/eslint/eslint/issues. The |
|
I created the issue on #402. |
|
After some discussion, I believe the issue should be addressed on the plugin side:
@nzakas, given this context, do you think this PR can be reopened? |

Prerequisites checklist
What is the purpose of this pull request?
When using
@eslint/markdownas a plugin in an ESLint config file, TypeScript throws the following error if theexactOptionalPropertyTypescompiler option is enabled:Type 'typeof plugin' is not assignable to type 'Plugin'. ... Type 'undefined' is not assignable to type '(string | string[])[]'.ts(2322)For example, this can be triggered by using
plugins: { markdown }in:This PR fixes the issue.
What changes did you make? (Give an overview)
I noticed that the
Plugintype was unused, so I updated it to be compatible withexactOptionalPropertyTypesand began using it, without breaking existing tests.Related Issues
-
Is there anything you'd like reviewers to focus on?
-