Comments (1)
Some people are getting some value out of it but I'd guess that the improvements released in v7.9.0 and soon to release in TS5.5 are going to fix some OOMs.
There are footguns with it as well so yeah I'm happy if we remove it.
The reason it never progressed is because essentially TS would only parse a subset of files from another tsconfig. So it meant that in many cases perf/memory was worse!
A .d.ts
file is light - only contains the exported decls and their types - but a .ts
file is heavy as it contains all the imementations AND pulls in more of the dep graph than necessary.
If project A references project B then when we got the program for A then TS would parse and typecheck a subset of B's .ts
files. But unless that "subset" somehow was actually the entirety of B, then when we inevitably parsed an out-of-subset part of B, we would need to get the program for B - meaning we'd re-parse and re-typecheck that subset all over again.
OTOH with .d.ts
files - because you're only parsing a file's exported signature - it's always lightweight and includes the minimum types to define that signature. So the file is light and the graph is light. There's not much type-check work to do because there aren't implementations to check.
Also imagine if there are some node modules used in implementations for B (but not A) - and those module's types aren't used in the exported signatures. With .ts
files we'd need to typecheck the types for that node module twice (once for A then once for B) - but with .d.ts
files we'd only need to do once (once for B).
Finally imagine a highly interdependent project. Eg imagine if you have C, D, and E which all also depend on B. Now you have 4 copies of the subgraph of B.
Essentially it was a dead-end. It kind-of let us share types between programs in specific usecases but in reality it was worse.
We really want to say "this program uses types from this program" to have two isolated but shared things - but TS doesn't support that.
from typescript-eslint.
Related Issues (20)
- Bug: [v8.0.0-alpha.10] incorrect error message `Parsing error: "parserOptions.programs"` HOT 1
- Bug: [member-ordering] Not Detecting Order For Read-Only Fields Correctly HOT 1
- Bug: Default configuration following https://typescript-eslint.io/getting-started results in error HOT 1
- Bug(typescript-estree): always parse mts/mjs as ESM for non-type-aware parsing HOT 6
- Docs: Write blog post on the history of ban-types, {}, and object/Object
- Bug: [no-unnecessary-boolean-literal-compare] False positive and unsafe fix with exactOptionalPropertyTypes HOT 6
- no-unsafe-call: ban calling Function HOT 7
- Types: `plugin` and `parser` types incompatible with ESLint types HOT 6
- Issue with the subDependencies of typescript-eslint HOT 1
- Bug: Type incompatibility with `fixupPluginRules()` from `@eslint/compat` HOT 3
- Bug: parsing a function with argument throws an error when `range` parse option is not set HOT 6
- Bug: [8.0.0-alpha] [no-unused-vars] Support for `ignoreClassWithStaticInitBlock` and `reportUsedIgnorePattern` Options HOT 7
- Bug: "Invalid string length" caused by allowDefaultProjectForFiles warning HOT 4
- Enhancement: [no-inferrable-types] Support for the upcoming compiler options `isolatedDeclarations` HOT 2
- Bug: typescript eslint raises warnings when used with react-hooks HOT 6
- Repo: include github tags in releases HOT 4
- Enhancement: [naming-convention] Add an optional identifier member of each option HOT 1
- Bug: [no-inferrable-types] False positive with default parameter in closure passed to generic function HOT 1
- Repo (eslint-plugin) [consistent-type-assertions] test case missing output assertion
- Try out v8 beta on various important community repos HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript-eslint.