-
Notifications
You must be signed in to change notification settings - Fork 12.8k
exactOptionalPropertyTypes
: strict type equality is too lenient
#61547
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
Comments
I think this is not so much a bug with TypeScript, but just a bug with the |
So maybe this is more of a feature suggestion than a bug report? People need this functionality:
|
It does indicate a bug in TypeScript, in my opinion. I think it boils down to "a spot was missed" whenever they were implementing |
π Search Terms
"exactOptionalPropertyTypes", "strict type equality"
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?exactOptionalPropertyTypes=true#code/PTAEFMA8EMGMBcDyAHeBLA9gO2gGwAoBOGy4h8AngCoWkDOAXAFBOWmhUCMoAvKAN5NQoZMWQB+BqDrxCaLAHMANEwC+rWuA4AmXgKEixk0AFcsAE3AAzeeHOgAPtNnzlajewD6egNoGQoIAy5Bzc0BY6oNCEWrDYdGiW0fYycgi4FBAAjiZ4BgCCdHRk8AA8AKLZeCUGwlxKOgYAfI0qwgFckeFUulFaWBjwoLFY8Yl2oLgYGEXpWTm4+YXFJQByAyUAMlNFFfPVwrWc9d1Nza2g7bpodKD9g9CFaAo4AEa4WvAYIYtF5KvrBXiz2gb3A+wOdQawmaLX8YA610ij2BoNAnyhoEBy0BT1e73BtW0x04pxUAF0ANwsNhaLF-TxUCCQeDgCw3WQmcCNPQANwwCSpAUAvBuAI-2OKkANZor4uBQKMjOVKDGlzPBoSgAOlAAGUMCZCLBwFIABbweDIRggBTq40mF4a2IAW2AAFk0LBiHQMFZ4MAaKRtR60KhgNc6Jy6MBtAB2AAM2gALABiMOcp2O1nwAC0Ce0nAArNoAJwANnzsY8Wl2VQAGvUAJrcngGAAUJSojRbAEpeNzGVAWWzQDXQOJQNwpNoewPWeY6K3252ezw+0zB3PQPXR+PQJOe2OOVopFY8EUDFSVVtpuBq7gSnXN02DD4a2S17Obj562SDGOW1+3xnIcXzfA9CE5XdQBPXAii7Axj1PcBz0rUA1lKAAhd8hxeKZ3jCJ82jAAADW8iNAF5wFgaATCKUAAHcwmVL5oD5BJUPWMIKG5CjXFAIjoKKMiMEIPjDyIgxbxKdD6kPbkgI3Q8am3ASkIOSCW0k6SoMQuTmQ-NFwK0MCIKkLBwB5Mg4OEC9NExZE8TBKgonleB6l1fVDSbUAfHcg1wEAvTgKcwgXNAgyTO0mDwCpIA
π» Code
π Actual behavior
T1
andT2
are considered to be strictly equal β even thoughT2
is not assignable toT1
.π Expected behavior
T1
andT2
should not be considered strictly equal.Additional information about the issue
The text was updated successfully, but these errors were encountered: