Skip to content

New error: Argument of type '(result: Result) => void' is not assignable to parameter of type '(value: awaited Result) => void | PromiseLike<void>' #37566

Closed
@amcasey

Description

@amcasey

https://github.com/linkedin/css-blocks/blob/6023475e9ab9a01cda6daa71986a9b4932c16ecd/packages/@css-blocks/core/src/util/PromiseQueue.ts#L35

packages/@css-blocks/core/src/util/PromiseQueue.ts:35:7 - error TS2345: Argument of type '(result: Result) => void' is not assignable to parameter of type '(value: awaited Result) => void | PromiseLike<void>'.
  Types of parameters 'result' and 'value' are incompatible.
    Type 'awaited Result' is not assignable to type 'Result'.
      'Result' could be instantiated with an arbitrary type which could be unrelated to 'awaited Result'.

35       (result: Result) => {
         ~~~~~~~~~~~~~~~~~~~~~

To repro:

  1. yarn
  2. tsc -b -f packages

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions