Skip to content
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

Not compatible with TS 5.4 #18

Open
sebbi08 opened this issue Mar 11, 2024 · 0 comments
Open

Not compatible with TS 5.4 #18

sebbi08 opened this issue Mar 11, 2024 · 0 comments

Comments

@sebbi08
Copy link

sebbi08 commented Mar 11, 2024

When trying to use the library with Typescript 5.4 we get the following error

image

node_modules/easy-tsnameof/dist/types/ts-essentials.d.ts:36:280 - error TS2344: Type 'DeepNullable<K>' does not satisfy the constraint 'object'.
  Type 'object | (Builtin & object) | Map<unknown, unknown> | ReadonlyMap<unknown, unknown> | WeakMap<object, unknown> | Set<unknown> | ReadonlySet<unknown> | WeakSet<object> | unknown[] | Promise<...> | null' is not assignable to type 'object'.
    Type 'null' is not assignable to type 'object'.

36 export declare type DeepNullable<T> = T extends Builtin ? T | null : T extends Map<infer K, infer V> ? Map<DeepNullable<K>, DeepNullable<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<DeepNullable<K>, DeepNullable<V>> : T extends WeakMap<infer K, infer V> ? WeakMap<DeepNullable<K>, DeepNullable<V>> : T extends Set<infer U> ? Set<DeepNullable<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<DeepNullable<U>> : T extends WeakSet<infer U> ? WeakSet<DeepNullable<U>> : T extends Array<infer U> ? T extends IsTuple<T> ? {
                                                                                                                                                                                                                                                                                          ~~~~~~~~~~~~~~~

node_modules/easy-tsnameof/dist/types/ts-essentials.d.ts:36:465 - error TS2344: Type 'DeepNullable<U>' does not satisfy the constraint 'object'.
  Type 'object | (Builtin & object) | Map<unknown, unknown> | ReadonlyMap<unknown, unknown> | WeakMap<object, unknown> | Set<unknown> | ReadonlySet<unknown> | WeakSet<object> | unknown[] | Promise<...> | null' is not assignable to type 'object'.

36 export declare type DeepNullable<T> = T extends Builtin ? T | null : T extends Map<infer K, infer V> ? Map<DeepNullable<K>, DeepNullable<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<DeepNullable<K>, DeepNullable<V>> : T extends WeakMap<infer K, infer V> ? WeakMap<DeepNullable<K>, DeepNullable<V>> : T extends Set<infer U> ? Set<DeepNullable<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<DeepNullable<U>> : T extends WeakSet<infer U> ? WeakSet<DeepNullable<U>> : T extends Array<infer U> ? T extends IsTuple<T> ? {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ~~~~~~~~~~~~~~~

node_modules/easy-tsnameof/dist/types/ts-essentials.d.ts:42:300 - error TS2344: Type 'DeepUndefinable<K>' does not satisfy the constraint 'object'.
  Type 'object | (Builtin & object) | Map<unknown, unknown> | ReadonlyMap<unknown, unknown> | WeakMap<object, unknown> | Set<unknown> | ReadonlySet<unknown> | WeakSet<object> | unknown[] | Promise<...> | undefined' is not assignable to type 'object'.
    Type 'undefined' is not assignable to type 'object'.

42 export declare type DeepUndefinable<T> = T extends Builtin ? T | undefined : T extends Map<infer K, infer V> ? Map<DeepUndefinable<K>, DeepUndefinable<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<DeepUndefinable<K>, DeepUndefinable<V>> : T extends WeakMap<infer K, infer V> ? WeakMap<DeepUndefinable<K>, DeepUndefinable<V>> : T extends Set<infer U> ? Set<DeepUndefinable<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<DeepUndefinable<U>> : T extends WeakSet<infer U> ? WeakSet<DeepUndefinable<U>> : T extends Array<infer U> ? T extends IsTuple<T> ? {
                                                                                                                                                                                                                                                                                                              ~~~~~~~~~~~~~~~~~~

node_modules/easy-tsnameof/dist/types/ts-essentials.d.ts:42:497 - error TS2344: Type 'DeepUndefinable<U>' does not satisfy the constraint 'object'.
  Type 'object | (Builtin & object) | Map<unknown, unknown> | ReadonlyMap<unknown, unknown> | WeakMap<object, unknown> | Set<unknown> | ReadonlySet<unknown> | WeakSet<object> | unknown[] | Promise<...> | undefined' is not assignable to type 'object'.

42 export declare type DeepUndefinable<T> = T extends Builtin ? T | undefined : T extends Map<infer K, infer V> ? Map<DeepUndefinable<K>, DeepUndefinable<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<DeepUndefinable<K>, DeepUndefinable<V>> : T extends WeakMap<infer K, infer V> ? WeakMap<DeepUndefinable<K>, DeepUndefinable<V>> : T extends Set<infer U> ? Set<DeepUndefinable<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<DeepUndefinable<U>> : T extends WeakSet<infer U> ? WeakSet<DeepUndefinable<U>> : T extends Array<infer U> ? T extends IsTuple<T> ? {
                                                                                                                                                                                                     
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant