Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should we set '"types": []' for 'tsc init'?

See original GitHub issue

Very few people understand the automatic @types inclusion behavior, it often causes packages to conflict, and it is often a program construction performance foot-gun.

Maybe we should output a field like this in compilerOptions.

// Add packages with global definitions that can't be imported here.
// Remove entirely to auto-include all '@types' packages.
"types": []

What do others here think?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

ortacommented, Jul 1, 2020


RyanCavanaughcommented, Jul 1, 2020

Hmm, also yes

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - tsc CLI Options - TypeScript
Flag Type Default ‑‑allowJs boolean false ‑‑allowUmdGlobalAccess boolean false ‑‑allowUnreachableCode boolean
Read more >
Typescript Project Configuration - Medium
I 've been working on a couple projects that are written with typescript so I've been learning here and there, but I wanted...
Read more >
Generating Default TypeScript Configuration Files with tsc --init
TypeScript 1.6 introduced the --init flag for the tsc executable to make it easier to set up new TypeScript projects. A short summary....
Read more >
How To Set Up a New TypeScript Project - DigitalOcean
When you write code in TypeScript, running tsc will transform or compile your code into JavaScript. Using the --init flag in the above...
Read more >
How to set up TypeScript with Node.js and Express
When you initialize a package.json file, the --yes flag uses the default ... Type declarations are usually contained in files with a .d.ts ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found