Skip to content

Regression on Promise Type Checking in Latest Insiders #15352

Closed
@mjbvz

Description

@mjbvz

From: microsoft/vscode#25215

TypeScript Version: 2.3.1-insiders0420

Code

Using es2015.lib.d.ts:

function foo(x: Promise<boolean>) {}

foo(new Promise(() => true))

Expected behavior:
This compiles fine with TS 2.2.2 and with the older insiders 2.3.1 release.

Actual behavior:
With the current insiders, we get: message: 'Argument of type 'Promise<{}>' is not assignable to parameter of type 'Promise<boolean>'. Type '{}' is not assignable to type 'boolean'.'

This is causing upwards of 230 compiler errors in the vscode codebase

Possible related to #15104

Metadata

Metadata

Assignees

No one assigned

    Labels

    Breaking ChangeWould introduce errors in existing codeVS Code TrackedThere is a VS Code equivalent to this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions