Skip to content

Compilation hangs when using Bluebird promise library #17716

@wtrocki

Description

@wtrocki

Introduction

Passing bluebird promise from top level application to separate node.js module causing typescript compiler to hang until it gets out of memory. Problem is happening with multiple typescript compiler versions.

Using promises within the same npm module do not cause any of this problems.

** Environment **
TypeScript Version: Version 2.4.1
Latest bluebird library:

@types/bluebird: "^3.5.5",
bluebird: "^3.5.0",

Code
Simplified example:

// index.ts (separate npm module)
import * as Promise from 'bluebird';
export function init(test: Promise<object>){
      // Code
}

// App using module
import {init} from 'extmodule';
init(promise);

Expected behavior:
Code should compile.

Actual behavior:
Compilation process hangs with extensive memory and processor usage.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions