Comments (3)
Great reasons though, thanks for writing it up!
from apollo-upload-client.
Sorry for the late reply.
One day I will write a detailed article to link people too whenever this topic comes up. Over the years I've made lots of detailed comments in various repos explaining why (e.g. jaydenseric/graphql-upload#282 (comment)), but it's not easy to dig them all up as a reference.
Of the many advantages, these ones stand out:
- No build step. Being able to directly edit and format the published modules is a fantastic simplification.
- The types are shipped inline within the published module. In Deno for example, when you import the module via a URL type safety just works without having to tell Deno to go get definitions over the network from a different URL.
- When users in their editor CMD+click on exported things of this package in their code, it takes them directly to the real code they are using instead of off to a seperate TS definitions file that doesn't contain the actual code. This is a great DX improvement.
- Significantly less bloated
node_modules
because you are not doubling the amount of files by having a companion.d.mts
file for every.mjs
file.
from apollo-upload-client.
- can be solved by publishing the source, but that worsens 4) because you'd be publishing 3x, the js code, the d.ts code AND the ts code. That's what I'm doing now though.
if only all js runtime support ts by default for future...
from apollo-upload-client.
Related Issues (20)
- Module not found - after updating to 18.0.1 HOT 2
- Problem with Typescript HOT 2
- Document required TypeScript libs HOT 1
- How do you use ReactNativeFile in the latest version HOT 3
- Error with Vite HOT 1
- Failed to resolve entry for package "apollo-upload-client". HOT 2
- Support for @defer directive?
- Version 18 doesn't work with React Native HOT 2
- Module not found HOT 2
- Broken compatibility with HotChocolate 13.2 -> HOT 1
- Version 18 incompatible with Next.js HOT 3
- Support with @habx/apollo-multi-endpoint-link HOT 2
- Query on Compatibility with @apollo/client 3.9.0 and apollo-upload-client HOT 1
- Pending requests issue HOT 2
- importing the library in react js project HOT 1
- "Reached maximum amount of queued data" in Safari HOT 2
- Must provide query string HOT 3
- Can this lib provider `typings` HOT 4
- ReactNativeFile HOT 3
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 apollo-upload-client.