Skip to content

Type 'V' does not satisfy the constraint '{}' #254

@cyrildever

Description

@cyrildever

When upgrading TypeScript to version 4.8.x, I have the following compilation errors:

node_modules/monet/dist/monet.d.ts:132:30 - error TS2344: Type 'V' does not satisfy the constraint '{}'.

132   join<V>(): T extends Maybe<V> ? V : never;
                                 ~

  node_modules/monet/dist/monet.d.ts:132:8
    132   join<V>(): T extends Maybe<V> ? V : never;
               ~
    This type parameter might need an `extends {}` constraint.

node_modules/monet/dist/monet.d.ts:181:24 - error TS2344: Type 'V' does not satisfy the constraint '{}'.

181   <V>(value: V): Maybe<V>;
                           ~

  node_modules/monet/dist/monet.d.ts:181:4
    181   <V>(value: V): Maybe<V>;
           ~
    This type parameter might need an `extends {}` constraint.

node_modules/monet/dist/monet.d.ts:185:16 - error TS2344: Type 'V' does not satisfy the constraint '{}'.

185   <V>(): Maybe<V>;
                   ~

  node_modules/monet/dist/monet.d.ts:185:4
    185   <V>(): Maybe<V>;
           ~
    This type parameter might need an `extends {}` constraint.

node_modules/monet/dist/monet.d.ts:195:46 - error TS2344: Type 'V' does not satisfy the constraint '{}'.

195   fromFalsy<V>(val: V|null|undefined): Maybe<V>;
                                                 ~

  node_modules/monet/dist/monet.d.ts:195:13
    195   fromFalsy<V>(val: V|null|undefined): Maybe<V>;
                    ~
    This type parameter might need an `extends {}` constraint.

node_modules/monet/dist/monet.d.ts:196:45 - error TS2344: Type 'V' does not satisfy the constraint '{}'.

196   fromNull<V>(val: V|null|undefined): Maybe<V>;
                                                ~

  node_modules/monet/dist/monet.d.ts:196:12
    196   fromNull<V>(val: V|null|undefined): Maybe<V>;
                   ~
    This type parameter might need an `extends {}` constraint.

node_modules/monet/dist/monet.d.ts:197:45 - error TS2344: Type 'V' does not satisfy the constraint '{}'.

197   fromUndefined<V>(val: V|undefined): Maybe<V>;
                                                ~

  node_modules/monet/dist/monet.d.ts:197:17
    197   fromUndefined<V>(val: V|undefined): Maybe<V>;
                        ~
    This type parameter might need an `extends {}` constraint.

node_modules/monet/dist/monet.d.ts:198:46 - error TS2344: Type 'V' does not satisfy the constraint '{}'.

198   fromEmpty<V>(val: V|null|undefined): Maybe<V>;
                                                 ~

  node_modules/monet/dist/monet.d.ts:198:13
    198   fromEmpty<V>(val: V|null|undefined): Maybe<V>;
                    ~
    This type parameter might need an `extends {}` constraint.

node_modules/monet/dist/monet.d.ts:248:20 - error TS2344: Type 'T' does not satisfy the constraint '{}'.

248   toMaybe(): Maybe<T>;
                       ~

  node_modules/monet/dist/monet.d.ts:216:28
    216 export interface Either<E, T>
                                   ~
    This type parameter might need an `extends {}` constraint.

node_modules/monet/dist/monet.d.ts:320:20 - error TS2344: Type 'T' does not satisfy the constraint '{}'.

320   toMaybe(): Maybe<T>;
                       ~

  node_modules/monet/dist/monet.d.ts:286:32
    286 export interface Validation<E, T>
                                       ~
    This type parameter might need an `extends {}` constraint.

node_modules/monet/dist/monet.d.ts:376:28 - error TS2344: Type 'T' does not satisfy the constraint '{}'.

376   lookup(i: number): Maybe<T>;
                               ~

  node_modules/monet/dist/monet.d.ts:352:23
    352 export interface List<T> extends IMonad<T>, Setoid<List<T>>, ITraversable<T>, Iterable<T> {
                              ~
    This type parameter might need an `extends {}` constraint.

node_modules/monet/dist/monet.d.ts:384:38 - error TS2344: Type 'V' does not satisfy the constraint '{}'.

384   flattenMaybe<V>(): T extends Maybe<V> ? List<V> : never;
                                         ~

  node_modules/monet/dist/monet.d.ts:384:16
    384   flattenMaybe<V>(): T extends Maybe<V> ? List<V> : never;
                       ~
    This type parameter might need an `extends {}` constraint.

node_modules/monet/dist/monet.d.ts:463:40 - error TS2344: Type 'T' does not satisfy the constraint '{}'.

463   find(fn: (val: T) => boolean): Maybe<T>;
                                           ~

  node_modules/monet/dist/monet.d.ts:436:22
    436 export interface NEL<T> extends IMonad<T>, Setoid<NEL<T>>, ITraversable<T>, Iterable<T> {
                             ~
    This type parameter might need an `extends {}` constraint.

node_modules/monet/dist/monet.d.ts:469:28 - error TS2344: Type 'T' does not satisfy the constraint '{}'.

469   lookup(i: number): Maybe<T>;
                               ~

  node_modules/monet/dist/monet.d.ts:436:22
    436 export interface NEL<T> extends IMonad<T>, Setoid<NEL<T>>, ITraversable<T>, Iterable<T> {
                             ~
    This type parameter might need an `extends {}` constraint.

node_modules/monet/dist/monet.d.ts:482:38 - error TS2344: Type 'V' does not satisfy the constraint '{}'.

482   flattenMaybe<V>(): T extends Maybe<V> ? List<V> : never;
                                         ~

  node_modules/monet/dist/monet.d.ts:482:16
    482   flattenMaybe<V>(): T extends Maybe<V> ? List<V> : never;
                       ~
    This type parameter might need an `extends {}` constraint.


Found 14 errors in the same file, starting at: node_modules/monet/dist/monet.d.ts:132

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions