You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The change for #263 in release v2.3.2 no longer prevents the use of the keys in the Except.
The following code no longer gives an error:
import{Except}from'type-fest';interfaceWithBar{foo: string;bar: number;}typeWithoutBar=Except<WithBar,'bar'>;constwithBar={foo: 'Hell World',bar: 42};// The following assignment should result in an error, but no longer results in an error after the change of #263constwithoutBar: WithoutBar=withBar;
Before 2.3.2 type-fest used never and you weren't allowed to assign an object that contains a key that was added to the except list. The documentation still states that Except is a stricter version of Omit, but I don't think it currently is.
Conceptually type-fest was generating the following code before 2.3.2:
interfaceWithBarNever{foo: string;bar: never;}// Results in a compile error as the object should not contain a `bar` propertyconstwithoutBarNever: WithBarNever=withBar;
The text was updated successfully, but these errors were encountered:
I am closing this issue, it seems impossible to reproduce the error with the old or new version. Feel free to reopen this issue if you have a reproducible example.
The change for #263 in release v2.3.2 no longer prevents the use of the keys in the Except.
The following code no longer gives an error:
Before 2.3.2 type-fest used
never
and you weren't allowed to assign an object that contains a key that was added to the except list. The documentation still states that Except is a stricter version ofOmit
, but I don't think it currently is.Conceptually
type-fest
was generating the following code before2.3.2
:The text was updated successfully, but these errors were encountered: