What is Typescript and why should we use it?
"TypeScript is a typed superset of JavaScript developed by Microsoft that compiles to plain JavaScript. Unlike JavaScript, TypeScript adds optional static typing and other features like interfaces, generics, and enums to enable stronger tooling and code quality at scale."
https://prismic.io/blog/compare-javascript-vs-typescript
To put it in my (Matt) own words, Typescript is what you want to use for enterprise development.
Static Typing:
Type Safety: TypeScript uses static typing, allowing you to define types for variables, function parameters, and return values. This helps catch potential errors during development rather than at runtime, leading to more robust and reliable code.
Code Documentation: TypeScript code is self-documenting with type annotations, making it easier for developers to understand and maintain the codebase.
Tooling and IDE Support:
Intelligent Code Completion: TypeScript provides better support for code editors and integrated development environments (IDEs) by offering features like intelligent code completion, navigation, and refactoring tools.
Early Error Detection: The TypeScript compiler catches many errors during development, providing quicker feedback and reducing the chances of runtime errors.
Readability and Maintainability:
Code Clarity: With explicit type annotations, TypeScript code is often clearer and more readable, making it easier for developers to understand the structure and intent of the code.
Enhanced Refactoring: TypeScript's static typing facilitates safer and more efficient code refactoring, as the IDE can understand the relationships between different parts of the code.
Is Typescript a fad or just some passing technology?
No, Typescript is the default or supported language for most popular frameworks such as Angular, React, Vue.js, NestJs, Next.js, TypeOrm, etc.
According to the annual StackOverflow survey, Typescript is the fourth most popular language. Javascript remains the most popular, but Javascript lacks all of the type safety and features identified previously. Javascript in the wild is a bad idea and will always result in worse code quality.
Issue Description
What is Typescript and why should we use it? "TypeScript is a typed superset of JavaScript developed by Microsoft that compiles to plain JavaScript. Unlike JavaScript, TypeScript adds optional static typing and other features like interfaces, generics, and enums to enable stronger tooling and code quality at scale." https://prismic.io/blog/compare-javascript-vs-typescript
To put it in my (Matt) own words, Typescript is what you want to use for enterprise development.
Is Typescript a fad or just some passing technology?
No, Typescript is the default or supported language for most popular frameworks such as Angular, React, Vue.js, NestJs, Next.js, TypeOrm, etc.
According to the annual StackOverflow survey, Typescript is the fourth most popular language. Javascript remains the most popular, but Javascript lacks all of the type safety and features identified previously. Javascript in the wild is a bad idea and will always result in worse code quality.
Solution: [A proof of concept] (https://github.com/mjknight50/vets-website-typescript-poc ) has already been completed. Next steps would be to:
Bring the idea to the VA COP front-end meeting (scheduled for March 2nd at 2:00 EST)
Change the webpack build to allow for Typescript
Incrementally change our vets-website files from .jsx to .tsx