Skip to content

tsdown builds fine and ignores typecheck errors #933

@Badisi

Description

@Badisi

Reproduction link or steps

package.json

{
    "scripts": {
        "build": "tsdown index.ts --dts"
    },
    "devDependencies": {
        "tsdown": "^0.21.10",
        "typescript": "^6.0.3"
    }
}

index.ts

export const config: Config = {};

Steps:

  1. Run npm install
  2. Run npm run build

What is expected?

tsdown should complain about missing type as tsc does:

$ npx tsc index.ts --noEmit

index.ts:1:22 - error TS2304: Cannot find name 'Config'.

1 export const config: Config = {};
~~~~~~

Found 1 error in index.ts:1

What is actually happening?

tsdown is building without issues.

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions