Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: declaration is actually false by default #1092

Merged
merged 1 commit into from
Sep 17, 2020

Conversation

agilgur5
Copy link
Contributor

@agilgur5 agilgur5 commented Sep 16, 2020

Description

  • previously said "True when TS", but that isn't accurate

    • upon testing, it appears to be false by default
    • an explicit declaration: true is required in tsconfig.json for
      declaration files (.d.ts) to be output
  • the Compiler Options docs also say it's default false too, so not sure
    why it's different in the TSConfig Reference

Tags

This was discovered in jaredpalmer/tsdx#823 (comment)

Review Notes

Is there some way to auto-generate these from TS itself so that these are never incorrect/out-of-date?

I'm not sure what other discrepancies there may still be between the TSConfig Reference and Compiler Options docs

- previously said "True when TS", but that isn't accurate
  - upon testing, it appears to be false by default
  - an explicit `declaration: true` is required in `tsconfig.json` for
    declaration files (`.d.ts`) to be output

- the Compiler Options docs also say it's default false too, so not sure
  why it's different in the TSConfig Reference
  - c.f. https://github.com/microsoft/TypeScript-Website/blob/46b960968f994968b237060065f651a368e5fc63/packages/documentation/copy/en/project-config/Compiler%20Options.md#L47
@orta
Copy link
Contributor

orta commented Sep 17, 2020

Great - thanks, yeah, there is no way to automate them I'm afraid. The logic is pretty embedded in the compiler.

@orta orta merged commit cba99d6 into microsoft:v2 Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants