Skip to content

New error: Type 'awaited T' is not assignable to type 'T'. #37564

Closed
@amcasey

Description

@amcasey

https://github.com/conventional-changelog/commitlint/blob/0f0f95affc1c350fdb3e3c58eda48f9a845dfb27/@commitlint/execute-rule/src/index.ts#L20

@commitlint/execute-rule/src/index.ts:20:16 - error TS2322: Type 'awaited T' is not assignable to type 'T'.
  'T' could be instantiated with an arbitrary type which could be unrelated to 'awaited T'.

20  return [name, await fn()];
                  ~~~~~~~~~~

To repro:

  1. yarn
  2. yarn run build
  3. tsc -b -f

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