Skip to content

TSC 4.8.4 hangs up when compiling a small file #51412

@cassioarosa

Description

@cassioarosa

Bug Report

The issue can be seeing in playground by switching from .js tab to another tab, then switching back go .js tab. Image below.

When compiling the file via, npx tsc filename.ts the compilation takes to long to produce a result.

When using ts-jest was not possible to get a result, the test keeps running.

🔎 Search Terms

  • TSC Hang up
  • Version 4.8.4

⏯ Playground Link

Link

💻 Code

import { Collection } from "mongodb";

function getCollection<TSchema extends Document = Document>(
  name: string
): Collection<TSchema> {
  const value: any = null;

  return value;
}

async function foo() {
  await getCollection("COLLECTION_NAME").deleteMany({});
}

🙁 Actual behavior

🙂 Expected behavior

If possible, a faster response.

Possible related issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExternalRelates to another program, environment, or user action which we cannot control.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions