Skip to content

Type strictness not enforced #79

@GeorgesOatesLarsen

Description

@GeorgesOatesLarsen

Bug description

When running typescript files with tsx, type strictness is not enforced.

This might be intentional, in which case, consider this bug report a feature request. I would like to be able to specify type strictness when compiling/using tsx.

Here is a minimal recreation of the bug/lacking feature:
https://github.com/GeorgesOatesLarsen/tsx-bug-demo

Notice the obvious type mismatch in bug.ts:

let x : number = "This shouldn't work...";
console.log(x);

It just flat out shouldn't compile by my estimate.

Reproduction

Clone https://github.com/GeorgesOatesLarsen/tsx-bug-demo

Then run npm install

then run npx tsx bug.ts

Environment

Running on Windows 10. No interfering global installs AFAIK.

Can you contribute a fix?

  • I’m interested in opening a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions