Skip to content

TypeScript

November 22, 2023
December 11, 2014

typescript-runtime

TypeScript Origins: The Documentary - YouTube

TypeScript - JavaScript that scales.
Documentation Ā· TypeScript
Playground Ā· TypeScript
TypeScript: Handbook - The TypeScript Handbook
TypeScript/spec.md at master Ā· Microsoft/TypeScript

README - TypeScript Deep Dive
Javascript to Typescript | Skcript
Getting started with... TypeScript - Stack Overflow Blog
Learn TypeScript: A Pocketguide Tutorial | Prisma
Understand Typescript in 5 minutes - Je suis un dev
Tackling TypeScript: Upgrading from JavaScript
TypeScript for Node.js Developers - DEV Community šŸ‘©ā€šŸ’»šŸ‘Øā€šŸ’» video and repo
TypeScript Express tutorial Archives - Marcin Wanago Blog - JavaScript, both frontend and backend

Learn TypeScript - Best TypeScript Tutorials (2023) | gitconnected
Learn TypeScript from the ground up with James Henry free course
TypeScript for Beginner Programmers
Introduction Ā· TypeScript Deep Dive
Introduction to TypeScript with Josh Goldberg - YouTube
Introducing TypeScript - SitePoint Premium
Introduction to TypeScript - Ultimate Coursesā„¢
Learn TypeScript ā€“ The Ultimate Beginners Guide
What is TypeScript programming? Industrial-strength JavaScript
How not to learn TypeScript

How KEEP-87 & Typeclasses will change the way we write Kotlin - QuickBird Studios Blog

How TypeScriptā€™s Strict Mode Actually Fixes TypeScript | by Eran Shabi | Better Programming
Getting Strict With TypeScript. Making your TypeScript code moreā€¦ | by Jose Granja | Better Programming

Commentaries

Statically typed JavaScript via Microsoft TypeScript, Facebook Flow and Google AtScript
niieani/typescript-vs-flowtype: Differences between Flowtype and TypeScript -- syntax and usability

How ActionScript foreshadowed TypeScript | by Gary Nelson | JavaScript in Plain English

Why I Was Wrong About TypeScript (DevReach 2017) - YouTube
TYPESCRIPT: How I Learned To Stop Worrying And Trust The Compiler - YouTube

TypeScript -> JSDoc
TypeScript is 'not worth it' for developing libraries, says Svelte author, as team switches to JavaScript and JSDoc ā€¢ DEVCLASS
CREATOR OF SVELTE From TS TO JSDoc?? - YouTube
TS vs JSDoc | Prime Reacts - YouTube

Changelog/Features History

TypeScript devblog
Exploring TypeScript 5 features: Smaller, simpler, faster - LogRocket Blog
Write more readable code with TypeScript 4.4 - LogRocket Blog
LogRocket TypeScript Meetup: Write more readable code with TS 4.4 - YouTube

Types

type-challenges/type-challenges: Collection of TypeScript type challenges with online judge
Type Challenges Solutions
Understanding TypeScriptā€™s type notation Axel Rauschmayer

Home | DefinitelyTyped The repository for high quality TypeScript type definitions
Writing Declaration Files for @types | TypeScript

Fixing the TS7016 Error | Atomist Blog types not available

TypeScript: Documentation - Everyday Types Differences Between Type Aliases and Interfaces
TypeScript: Documentation - Utility Types
TypeScript: Documentation - Creating Types from Types

unknown vs any in TypeScript

TypeScript interface vs. type | pawelgrzybek.com
type vs interface in TypeScript - DEV Community
Types vs. interfaces in TypeScript - LogRocket Blog
The different between type and interface in TypeScript - Trung Vo - JavaScript and more

The only time I use interfaces is to expose types publicly so that the consumer of your code can extend the types if needed, or when implementing with a class.
While object implementing some interface can have more properties than the interface defines, types limit the shape to exactly what type has defined.

The definitive guide to typing functions in TypeScript - LogRocket Blog
TypeScript Interfaces: From Type to Interface - Ultimate Coursesā„¢
TypeScript Interfaces vs Types - Ultimate Coursesā„¢
Classes vs Interfaces in TypeScript - Ultimate Coursesā„¢
4.4 support type guards/type narrowing
Type Guard: boolean value that have implication to type of variables of union type
Understanding TypeScript: typeof Type Guard - Ultimate Coursesā„¢
Understanding TypeScript: instanceof Type Guard - Ultimate Coursesā„¢
User defined Type Guards in TypeScript - Ultimate Coursesā„¢
TypeScript Literal Type Guards and in Operator - Ultimate Coursesā„¢
LogRocket TypeScript Meetup: Write more readable code with TS 4.4 - YouTube

A first look at quicktype
Convert JSON to Swift, C#, TypeScript, Objective-C, Go, Java, C++ and more ā€¢ quicktype

Infer in TypeScript, the Great and Powerful - DEV Community
Understanding infer in TypeScript - LogRocket Blog
Mastering mapped types in TypeScript - LogRocket Blog

TypeScript: How to get types from arrays | Steve Holgado

Type Systems: Structural vs. Nominal typing explained

From JavaScript to TypeScript Pt. I: Types & Variables ā€• Scotch
The guide to conditional types in TypeScript - LogRocket Blog
Introduction to TypeScript Data Types ā€” Tuple, Enum, and Any | by John Au-Yeung | JavaScript in Plain English
Introduction to TypeScript Data Types (Part 1) | by John Au-Yeung | Better Programming
Introduction to TypeScript Data Types (Part 2) | by John Au-Yeung | Better Programming
Introduction to TypeScript Interfaces | by John Au-Yeung | Level Up Coding
More TypeScript Types You Need To Know Better | by David Choi | JavaScript in Plain English

Functions in TypeScript. Build robust functions that scale | by Dler Ari | Better Programming

Libraries

Comprehensive list of built-in utility types in TypeScript - codewithstyle.info
andnp/SimplyTyped: yet another Typescript type library for advanced types

TypeScript ESLint
typescript-eslint/typescript-eslint: :sparkles: Monorepo for all the tooling which enables ESLint to support TypeScript

Ts.ED - A Node.js and TypeScript Framework on top of Express/Koa.js.
tsedio/tsed: Ts.ED is a Node.js and TypeScript framework on top of Express to write your application with TypeScript (or ES6). It provides a lot of decorators and guideline to make your code more readable and less error-prone. ā­ļø Star to support our work!

Mongoose

TypeScript: Declaring Mongoose Schema + Model | Brian Love
yoitsro/joigoose: Joi validation for your Mongoose models without the hassle of maintaining two schemas

npm install mongoose --save
npm install @types/mongoose --save-dev
npm install @types/mongodb --save-dev

javascript - Mongoose the Typescript way...? - Stack Overflow
mongoose typescript models Ā· Appsilon/styleguide Wiki

szokodiakos/typegoose: Typegoose - Define Mongoose models using TypeScript classes.

Tips and Tricks

yoavbls/pretty-ts-errors: šŸ”µ Make TypeScript errors prettier and human-readable in VSCode šŸŽ€

Best Practices For Using TypeScript with Node.js ā€“ Bits and Pieces
šŸ”„ Mastering TypeScript: 20 Best Practices for Improved Code Quality | by Vitalii Shevchuk | ITNEXT
Microsoft/TypeScript-Node-Starter: A starter template for TypeScript and Node with a detailed README describing how to use the two together.
Node.js TypeScript Archives - Marcin Wanago Blog - JavaScript, both frontend and backend
How to Use Named Parameters in TypeScript | by Krzysztof Kwieciński | Better Programming

You Might Be Using Typescript Wrong... - YouTube use zod to validate and infer type, no type validation required

Enterprise Node + TypeScript | Khalil Stemmler - JavaScript Developer / Designer

4 Ways to Write More Effective TypeScript | by Lewis Fairweather | JavaScript in Plain English
My TypeScript Best Practices. A year ago I decided to finally tryā€¦ | by Justin Travis Waith-Mair | The Non-Traditional Developer | Medium

Some Lesser Known TypeScript Features ā€“ Articode ā€“ Medium
Advanced TypeScript Types with Examples - Level Up Coding

total-typescript/advanced-typescript-workshop: Matt's Advanced TypeScript workshop

Path aliases with TypeScript in Node.js - DEV Community šŸ‘©ā€šŸ’»šŸ‘Øā€šŸ’»

npm script

It's actually better to use tsconfig.json.

"scripts": {
  "start": "./node_modules/nodemon/bin/nodemon.js -e ts  \
    --exec \"npm run compile\"",
  "compile": "tsc --outDir ./build --module commonjs ./src/*.ts && \
    node ./build/server.js"
}

Using Typescript with hapi

Sample server project:

1. Setup and first query
prisma-examples/typescript/graphql-hapi at latest Ā· prisma/prisma-examples

Error on export

// error
export default const VERSION: number = 2016030600;

// change to
const VERSION: number = 2016030600;
export default VERSION;
// or
declare const VERSION: number;
export default VERSION = 2016030600;

Typescript compile error: error TS1109: Expression expected - Stack Overflow

Checking JS code

Type Checking JavaScript Files Ā· TypeScript

{
  "compilerOptions": {
    "allowJs": true /* Allow JavaScript files to be compiled. */,
    "checkJs": true /* Report errors in .js files. */,
    "lib": ["es2017"]
  },
  "include": ["src/**/*"],
  "typeAcquisition": {
    "enable": true
  }
}
  "baseUrl": "./src",
  "paths": {
      "@modules/*": ["rest/modules/*"],
      "@services/*": ["services/*"]
  }

Typing JSON import

Importing JSON file in TypeScript - Stack Overflow
Strongly Typed JSON in TypeScript - DEV Community