Frontend
1.0.0
1.0.0
  • Introduction
  • Project Guidelines
    • INTRODUCTION
    • PROJECT SETUP
      • Frameworks
      • Static type checking
      • Code Quality Tools
      • Enforcing good practices
      • Testing
      • Code versioning flow
      • Continuous Integration & Delivery
      • Isolated component development
    • EFFECTIVE AND CONSISTENT WORKFLOW
      • Code structure, architecture
      • Code versioning and review flow
      • Testing
      • Continuous Integration & Delivery
      • Dependency checking
      • Project Management Tools
      • Communication
    • THE QUALITY OUTPUT
      • Great UX/UI
        • Design & User Experience
        • SEO, SMO
      • Accessibility
        • Introduction
        • Why a11y?
        • Fundamentals
        • A11y in STRV
          • Share Knowledge
          • Project Life Cycle
          • A11y culture
      • Performance
        • Bundle Size
        • Deployment
        • Audits & Reports
      • Stability
        • Documentation
        • Analytics & Error Tracking
        • Quality Assurance
      • Security
    • FINAL WORDS
    • ACKNOWLEDGEMENT
Powered by GitBook
On this page

Was this helpful?

  1. Project Guidelines
  2. PROJECT SETUP

Static type checking

PreviousFrameworksNextCode Quality Tools

Last updated 2 years ago

Was this helpful?

For static type checking, we use . Typescript is a strongly-typed superset of JavaScript, which means that any valid JavaScript code is a valid TypeScript code, but on top of it we get additional features, such as type checking, ES6 syntax and JSX support. TypeScript is compiled into plain JavaScript.

Static type checking is very important as it means:

  • More robust code

  • Having fewer bugs in run-time, because bugs are caught in compile-time

  • Highly productive developer experience

  • Better onboarding of new developers

  • Easy debugging and refactoring

Benefits of TypeScript

  • Common and with a high adoption rate within a large community

  • Developed and maintained at Microsoft by very experienced developers

  • Has great tooling and integration in code editors or IDEs

  • Almost any 3rd party library has TS typings, available either as part of the library, or as a standalone @types/* package

It should be noted, that TypeScript doesn't guarantee 100% type safety. Since most of types are defined by users, a mistake in a type definition might lead to mistakes in code, so we should be careful when defining our types.

TypeScript