All Projects → danvk → effective-typescript

danvk / effective-typescript

Licence: other
Effective TypeScript: 62 Specific Ways to Improve Your TypeScript

Projects that are alternatives of or similar to effective-typescript

programming-book-3
Programming books 3: Python、 Machine-Learning、 Deep-Learning、 NLP
Stars: ✭ 89 (-88.6%)
Mutual labels:  books
go-basics
🔥 Исходники к курсу "Язык Go Для Начинающих"
Stars: ✭ 76 (-90.27%)
Mutual labels:  books
my-bookshelf
Collection of books/papers that I've read/I'm going to read/I would remember that they exist/It is unlikely that I'll read/I'll never read.
Stars: ✭ 49 (-93.73%)
Mutual labels:  books
mybook
书单
Stars: ✭ 124 (-84.12%)
Mutual labels:  books
Awesome-Black-Friday-Cyber-Monday-deals
2021 - Black Friday & Cyber Monday, Christmas & Holidays Deals for Developers, Techies, & Entrepreneurs,
Stars: ✭ 151 (-80.67%)
Mutual labels:  books
ebook
一路走来收藏的电子书
Stars: ✭ 26 (-96.67%)
Mutual labels:  books
Annual-Reading-List
A list of things to read every year.
Stars: ✭ 124 (-84.12%)
Mutual labels:  books
markdown-lab
Docker based Markdown Editing Environment for slides, resume, books and articles; New Linux ELF Video Course from this project author: https://www.cctalk.com/m/group/88089283
Stars: ✭ 46 (-94.11%)
Mutual labels:  books
lazarus-beginners-guide
A book written for new Lazarus users, named "Beginners’ Guide to Lazarus IDE". Moved to: https://gitlab.com/adnan360/lazarus-beginners-guide
Stars: ✭ 26 (-96.67%)
Mutual labels:  books
source
A wiki of tutorials
Stars: ✭ 34 (-95.65%)
Mutual labels:  books
cummings.ee
A collection of the work of Edward Estlin Cummings, as it enters the public domain.
Stars: ✭ 32 (-95.9%)
Mutual labels:  books
Austen-Works
Jane Austen’s Collected Works
Stars: ✭ 26 (-96.67%)
Mutual labels:  books
pbreadinglist
No description or website provided.
Stars: ✭ 19 (-97.57%)
Mutual labels:  books
books
A collection of online books for data science, computer science and coding!
Stars: ✭ 29 (-96.29%)
Mutual labels:  books
book-sentences
A collection of sentences from different books.
Stars: ✭ 43 (-94.49%)
Mutual labels:  books
notes
📖 What I'm reading lately
Stars: ✭ 85 (-89.12%)
Mutual labels:  books
ljvmiranda921.github.io
Github repository for github.io website ✨
Stars: ✭ 33 (-95.77%)
Mutual labels:  utterances
learning R
List of resources for learning R
Stars: ✭ 32 (-95.9%)
Mutual labels:  books
books
List of all Ruby books
Stars: ✭ 49 (-93.73%)
Mutual labels:  books
awesome-datascience-python
Awesome list Data Science and Python. 🐍
Stars: ✭ 62 (-92.06%)
Mutual labels:  books

Effective TypeScript

This is the code sample repo for Effective TypeScript: 62 Specific Ways to Improve Your TypeScript. The book is available through:

and others.

You can get the latest updates on the book at https://effectivetypescript.com.

Code Samples

Below you'll find a complete table of contents with links to standalone code samples for each item. All code samples should produce the expected errors (and no others) and expected types.

Unless otherwise noted in a comment at the top of the code sample, the samples are run with TypeScript's strict setting. These were produced and checked using literate-ts and TypeScript 3.7.0-beta. You may want to copy/paste them into the TypeScript playground.

  • Chapter 1: Getting to Know TypeScript

    • 📝 Item 1: Understand the Relationship Between TypeScript and JavaScript
    • 📝 Item 2: Know Which TypeScript Options You’re Using
    • 📝 Item 3: Understand That Code Generation Is Independent of Types
    • 📝 Item 4: Get Comfortable with Structural Typing
    • 📝 Item 5: Limit Use of the any Type
  • Chapter 2: TypeScript’s Type System

    • 📝 Item 6: Use Your Editor to Interrogate and Explore the Type System
    • 📝 Item 7: Think of Types as Sets of Values
    • 📝 Item 8: Know How to Tell Whether a Symbol Is in the Type Space or Value Space
    • 📝 Item 9: Prefer Type Declarations to Type Assertions
    • 📝 Item 10: Avoid Object Wrapper Types (String, Number, Boolean, Symbol, BigInt)
    • 📝 Item 11: Recognize the Limits of Excess Property Checking
    • 📝 Item 12: Apply Types to Entire Function Expressions When Possible
    • 📝 Item 13: Know the Differences Between type and interface
    • 📝 Item 14: Use Type Operations and Generics to Avoid Repeating Yourself
    • 📝 Item 15: Use Index Signatures for Dynamic Data
    • 📝 Item 16: Prefer Arrays, Tuples, and ArrayLike to number Index Signatures
    • 📝 Item 17: Use readonly to Avoid Errors Associated with Mutation
    • 📝 Item 18: Use Mapped Types to Keep Values in Sync
  • Chapter 3: Type Inference

  • Chapter 4: Type Design

    • 📝 Item 28: Prefer Types That Always Represent Valid States
    • 📝 Item 29: Be Liberal in What You Accept and Strict in What You Produce
    • 📝 Item 30: Don’t Repeat Type Information in Documentation
    • 📝 Item 31: Push Null Values to the Perimeter of Your Types
    • 📝 Item 32: Prefer Unions of Interfaces to Interfaces of Unions
    • 📝 Item 33: Prefer More Precise Alternatives to String Types
    • 📝 Item 34: Prefer Incomplete Types to Inaccurate Types
    • 📝 Item 35: Generate Types from APIs and Specs, Not Data
    • 📝 Item 36: Name Types Using the Language of Your Problem Domain
    • 📝 Item 37: Consider “Brands” for Nominal Typing
  • Chapter 5: Working with any

    • 📝 Item 38: Use the Narrowest Possible Scope for any Types
    • 📝 Item 39: Prefer More Precise Variants of any to Plain any
    • 📝 Item 40: Hide Unsafe Type Assertions in Well-Typed Functions
    • 📝 Item 41: Understand Evolving any
    • 📝 Item 42: Use unknown Instead of any for Values with an Unknown Type
    • 📝 Item 43: Prefer Type-Safe Approaches to Monkey Patching
    • 📝 Item 44: Track Your Type Coverage to Prevent Regressions in Type Safety
  • Chapter 6: Types Declarations and @types

    • 📝 Item 45: Put TypeScript and @types in devDependencies
    • 📝 Item 46: Understand the Three Versions Involved in Type Declarations
    • 📝 Item 47: Export All Types That Appear in Public APIs
    • 📝 Item 48: Use TSDoc for API Comments
    • 📝 Item 49: Provide a Type for this in Callbacks
    • 📝 Item 50: Prefer Conditional Types to Overloaded Declarations
    • 📝 Item 51: Mirror Types to Sever Dependencies
    • 📝 Item 52: Be Aware of the Pitfalls of Testing Types
  • Chapter 7: Writing and Running Your Code

  • Chapter 8. Migrating to TypeScript

    • 📝 Item 58: Write Modern JavaScript
    • 📝 Item 59: Use @ts-check and JSDoc to Experiment with TypeScript
    • 📝 Item 60: Use allowJs to Mix TypeScript and JavaScript
    • 📝 Item 61: Convert Module by Module Up Your Dependency Graph
    • 📝 Item 62: Don’t Consider Migration Complete Until You Enable noImplicitAny
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].