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

ditch TypeScript #54126

Closed
sylwesterdigital opened this issue Jul 30, 2024 · 2 comments
Closed

ditch TypeScript #54126

sylwesterdigital opened this issue Jul 30, 2024 · 2 comments
Labels
invalid Issues and PRs that are invalid.

Comments

@sylwesterdigital
Copy link

What is the problem this feature will solve?

When deciding whether to integrate TypeScript into a Node.js ecosystem, it's essential to weigh the benefits against potential drawbacks. Here are some well-reasoned arguments against implementing TypeScript:

Increased Complexity

  1. Learning Curve: Team members unfamiliar with TypeScript will need time to learn it, potentially slowing down development initially.
  2. Build Step: TypeScript requires a build step to transpile code into JavaScript, adding complexity to the development and deployment processes.
  3. Configuration Overhead: Setting up TypeScript involves configuring tsconfig.json and potentially other tools, which can be cumbersome and error-prone.

Performance and Development Speed

  1. Compilation Time: TypeScript compilation can add significant time to the build process, affecting productivity, especially in large projects.
  2. Development Speed: Strict typing can slow down development, as developers spend additional time defining types and resolving type errors.

Compatibility and Integration

  1. Library Compatibility: Not all JavaScript libraries have TypeScript typings, requiring developers to create or maintain custom type definitions.
  2. Tooling Integration: Existing tools and pipelines may need adjustments to accommodate TypeScript, which can introduce bugs and require additional maintenance.

Project and Team Considerations

  1. Project Size: For small projects or prototypes, the overhead of TypeScript may not be justified. The simplicity of JavaScript can be more beneficial.
  2. Team Experience: If the team has extensive experience with JavaScript and minimal experience with TypeScript, the transition can be disruptive and reduce productivity.
  3. Maintenance Burden: TypeScript codebases can require more ongoing maintenance, particularly in keeping type definitions up to date as the code evolves.

Real-World Constraints

  1. Immediate Deadlines: If the project has tight deadlines, the time required to adopt and transition to TypeScript may not be feasible.
  2. Resource Allocation: Implementing TypeScript requires investing time and resources that could be used for other priorities, such as new features or performance optimizations.

Ecosystem Stability

  1. Maturity of Existing Codebase: If the current JavaScript codebase is mature, stable, and well-understood, introducing TypeScript could destabilize the system.
  2. Incremental Benefits: The benefits of TypeScript (e.g., catching type errors early) might not outweigh the costs of transition if the existing codebase is already robust and well-tested.

Alternatives

  1. JS Doc Annotations: Using JSDoc annotations can provide some type-checking benefits without the need for a full TypeScript setup.
  2. Linting Tools: Enhanced JavaScript linting tools (like ESLint) can catch many common errors and enforce coding standards without TypeScript.

By considering these points, one can make a well-informed decision on whether or not to integrate TypeScript into a Node.js ecosystem, ensuring that the benefits outweigh the potential downsides.

What is the feature you are proposing to solve the problem?

Just leave it as it is. We do not need Microsoft everywhere.

What alternatives have you considered?

common sense, good code

@sylwesterdigital sylwesterdigital added the feature request Issues that request new features to be added to Node.js. label Jul 30, 2024
@github-project-automation github-project-automation bot moved this to Awaiting Triage in Node.js feature requests Jul 30, 2024
@Explosion-Scratch
Copy link

This seems very AI generated, (I'm noting the repetition of saying "well-reasoned/well-informed"). Node.js is not written in TypeScript, are you suggesting that node.js shouldn't be able to strip types from code? (a new feature, see #53725) Why not? You can still not write your code in TypeScript and have it work just as well, in fact you'd have to enable a separate flag --experimental-strip-types to run TS with node

@anonrig anonrig added the invalid Issues and PRs that are invalid. label Jul 31, 2024
@anonrig anonrig closed this as not planned Won't fix, can't repro, duplicate, stale Jul 31, 2024
@erenkulaksiz
Copy link

Thanks AI.

@RedYetiDev RedYetiDev removed the feature request Issues that request new features to be added to Node.js. label Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Issues and PRs that are invalid.
Projects
None yet
Development

No branches or pull requests

5 participants