Code Monkey home page Code Monkey logo

ts-compiler-errors's Introduction

ts-compiler-errors

Documentation on TypeScript's compiler errors, including a guide on how to fix them.

Contributing

Please do!

  • When you first install the repo, data/diagnosticMessages.json will be downloaded from the TypeScript repo. If you want to update it later, run node scripts/fetch_messages.js.
  • To build run yarn build. This will create dist/bundle.js. You should then be able to open index.html in the root directory in your web browser to view changes locally.
  • You can link to different errors with ?code=123
  • Code snippets should use 2 spaces for indentation, without semicolons.

Problematic errors

Many TypeScript errors include contextual information that is unique to the code which causes the error. TypeScript includes this information in {0} sections in the documentation. I try to include a representative example of the error, but as these errors are generic, it is easy to miss a case in which they trigger. Please open an issue if the documentation doesn't include a sample which is similar to your problem.

Some errors I haven't been able to figure out how to trigger, along with the code I expected to trigger the error, so they cannot be documented. If you can cause one of these, please open an issue!

  • TS1012 - Incredibly generic...
  • TS1020 - { [a: string = 'a']: any }
  • TS1022 - { [a]: any }
  • TS1041 - No longer used
  • TS1043 - No longer used
  • TS1045 - No longer used
  • TS1057 - No longer used
  • TS1059 - Couldn't trigger
  • TS1060 - Couldn't trigger
  • TS1097 - Very generic.
  • TS1100 - No longer used

ts-compiler-errors's People

Watchers

 avatar  avatar

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.