Skip to content

Flag --emitDeclarationOnly not working with tsc --build #47406

Closed
@frags51

Description

@frags51

Bug Report

We have a project with references (composite = true). I want to watch over the project and just emit declarations files and no JS. --emitDeclarationOnly is mentioned as compiler options in the TS CLI doc, but it does not seem to be working with --build:

error TS5072: Unknown build option '--emitDeclarationOnly'. Since it is mentioned as compiler options, I am assuming this is unexpected behavior. VS Code is able to provide us with type checks - does it generate JS for all files?

🔎 Search Terms

tsc build noemit

🕗 Version & Regression Information

TS version 3.9

Actual behavior

tsc --build --watch --emitDeclarationOnly does not work.

🙂 Expected behavior

tsc --build --watch --emitDeclarationOnly just emits declaration files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions