-
-
Notifications
You must be signed in to change notification settings - Fork 537
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
MergeExclusive is broken when used together with Except or built-in Omit #200
Comments
Do you have |
@sindresorhus thank you for the reply. This is my {
"exclude": ["**/node_modules", "**/.git", "**/dist", "**/tmp"],
"compilerOptions": {
"noEmit": true,
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true,
"allowJs": false,
"checkJs": false,
"skipLibCheck": true,
"lib": ["esnext", "dom"],
"module": "esnext",
"target": "esnext",
"sourceMap": true,
"jsx": "react",
"forceConsistentCasingInFileNames": true,
"importHelpers": false,
"resolveJsonModule": true,
"strict": true,
"noImplicitAny": false,
"noUnusedLocals": false, // optimization happens during build
"noUnusedParameters": false, // optimization happens during build
"suppressImplicitAnyIndexErrors": true,
"noEmitHelpers": true,
"noErrorTruncation": true,
"experimentalDecorators": true,
"assumeChangesOnlyAffectDirectDependencies": true
},
"watchOptions": {
// Use native file system events for files and directories
"watchFile": "useFsEventsOnParentDirectory",
"watchDirectory": "useFsEvents",
// Poll files for updates more frequently
// when they're updated a lot.
"fallbackPolling": "dynamicPriority"
}
} |
Hmm, this seems to me like a TypeScript limitation. It flattens the type when using I have made a playground if anyone wants to help debug this: https://www.typescriptlang.org/play?ts=4.2.3&ssl=16&ssc=1&pln=16&pc=2#code/C4TwDgpgBA6glsAFgewK7ADwDE4CcDOwAKuBADRQDKEAxsgHYAmJkAfFALxQDeA2gNIQQLaHHpQAogA8aAG1SMIGANZDkAMyg4CxUhVUgNVWg2alWAXQD8ALij0IANwi4AvgG4AUJ9CQoAWRcAcwhpOVR8OGdsPEIRCmo6JhF2Dk8ASAAKbTjSKAAfYySzSABKKAgpYAgmfChkACMAK1pgKCsMrPgkNEwc3UgEk2TzKAAyItMRcsLM7pR0DESpvS1YgYh2Cf7pqBtOnbzC5ZHIL28fPIBDTgDg0Jl5SOjuKCu7BuRkWQgr8VcKK8Gh8vj8-q4tjwoDQQd9fv9Ln4GrcAPIAWwQGCuFAARDQcaxvElCNCPrduJ4oG87MBcKhyJSoMCoLT6Z5XEA It might also be worth asking in microsoft/TypeScript#14094 where the type was inspired from. |
@natalya-kim @sindresorhus Seems to work with |
@sindresorhus The PR #263 introduced in v2.3.2 fix the issue with |
Environment
Problem
MergeExclusive is broken when used together with Except or the built-in Omit
How to reproduce
Screenshots
Click to see the screenshots
The text was updated successfully, but these errors were encountered: