Environment
- unplugin: 6.2.2
- typescript: 5.7.2
Reproduction
https://stackblitz.com/edit/vitejs-vite-lovdzaug?file=unplugin-foo.ts
Describe the bug
Definitions like:
type StringFilter = FilterPattern | {
include?: FilterPattern
exclude?: FilterPattern
};
... can cause friction when using the TypeScript exactOptionalPropertyTypes compiler option, since under that configuration, undefined is not a valid value to be passed into include or exclude. Would it break anything to widen the type to the following?:
type StringFilter = FilterPattern | {
include?: FilterPattern | undefined
exclude?: FilterPattern | undefined
};
Additional information
Environment
Reproduction
https://stackblitz.com/edit/vitejs-vite-lovdzaug?file=unplugin-foo.ts
Describe the bug
Definitions like:
... can cause friction when using the TypeScript
exactOptionalPropertyTypescompiler option, since under that configuration,undefinedis not a valid value to be passed intoincludeorexclude. Would it break anything to widen the type to the following?:Additional information