Content-Length: 285830 | pFad | http://github.com/microsoft/TypeScript/issues/15352

8E Regression on Promise Type Checking in Latest Insiders · Issue #15352 · microsoft/TypeScript · GitHub
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









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/microsoft/TypeScript/issues/15352

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy