Coder Social home page Coder Social logo

debates-stream's Introduction

THE SUPREME COURT OF TYPESCRIPT

We will be debating the most contentious topics in TypeScript. I will be arguing BOTH sides of every debate, with help from my crack legal team (you).

Debates

We'll be debating four main topics:

  1. Enums. Should you use them?

Verdict: Don't use them

  1. no-explicit-any - should you allow developers to submit any's into your codebase?

Verdict: Enable in applications (but allow exceptions for rare cases). Disable in library code. Disable in test suites.

  1. Types vs Interfaces. Which should you use?

Verdict: It depends. Use whatever your team use.

  1. noImplicitReturns - should you force your developers to specify return types in all cases?

Verdict: The more consumers your function has, the more benefit you get from adding a return type. Many functions do not have consumers, or their consumers are hidden in a framework (React components). So, forcing developers to explicitly pass return types is bad.

Exhibits

If you want to help argue your case, you'll need to submit exhibits. PR some TypeScript into the src/exhibits folder, and I'll see if it's useful in court. Who knows - your code could become a star witness.

debates-stream's People

Contributors

finndore avatar fuale avatar mattpocock avatar syhner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

debates-stream's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.