Companion articles and projects for the Learning TypeScript book.

Overview

Website

This website is built using Docusaurus 2, a modern static website generator.

Installation

$ yarn

Local Development

$ yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

$ yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.

Deployment

Using SSH:

$ USE_SSH=true yarn deploy

Not using SSH:

$ GIT_USER=<Your GitHub username> yarn deploy

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.

Comments
  • docs: broken links for edit page modified

    docs: broken links for edit page modified

    PR Checklist

    Overview

    • Broken URL modified.
    opened by ssavi-ict 3
  • 🐛 Bug:

    🐛 Bug: "Edit this page" links are broken in projects

    Bug Report Checklist

    • [X] I have searched for related issues and found none that matched my issue.
    • [X] This is the appropriate issue form for the bug I would like to report.

    Expected

    In pages like https://www.learningtypescript.com/from-javascript-to-typescript, Edit this page takes you to URLs like https://github.com/LearningTypeScript/projects/tree/main/src/content/external/projects/from-javascript-to-typescript/README.md. That's a 404.

    Actual

    They should go cross-repo to URLs like https://github.com/LearningTypeScript/projects/blob/main/projects/from-javascript-to-typescript/README.md.

    Additional Info

    No response

    type: bug good first issue accepting prs 
    opened by JoshuaKGoldberg 3
  • 🐛 Bug: Contrast is too low in dark mode

    🐛 Bug: Contrast is too low in dark mode

    Bug Report Checklist

    • [X] I have searched for related issues and found none that matched my issue.
    • [X] This is the appropriate issue form for the bug I would like to report.

    Expected

    Links on the site should be more readable in dark mode

    Actual

    The dark-grey-on-black is hard to read:

    This same color is used on other text in dark mode, like in the table of contents. White, or another lighter color would do better instead.

    Additional Info

    Sorry if this isn't really a "bug", but I wasn't sure where else to put it!

    type: bug good first issue accepting prs area: accessibility 
    opened by xavdid 2
  • 🐛: fix editUrl for docs (projects)

    🐛: fix editUrl for docs (projects)

    PR Checklist

    Overview

    Fixes the edit URL to be a join on the main branch -> projects/ plus the computed docsPath.

    opened by JoshuaKGoldberg 2
  • ✨ Feature: form for asking questions concerning the book

    ✨ Feature: form for asking questions concerning the book

    Feature Request Checklist

    • [X] I have searched for related issues and found none that matched my issue.
    • [X] This is the appropriate issue form for the feature I would like to request.

    Feature

    submitting questions concerning a topic in the book via a form or something like that

    Additional Info

    Don't know if its allowed to ask this here but I just started to read your book, really helpful stuff but I am kinda lost on a particular term.... "signature". Simply what are signatures in typescript? I do know the call, construct and index signatures (ie their syntax their use cases) but I am still confused on the "signature" term. To further clarify my question is there a catch all phrase to explain what a signature is in typescript. I asked this on stackoverflow and the answer was '"signature" is used in TypeScript to mean an entry in an object-like type surrounded by curly braces (but usually not referring to plain properties.) If I have an interface Foo { bar: string; [k: string]: unknown; baz(): void; (x: string): number; new (y: string): Date } then Foo has a bar property, and a string index signature, and a baz method signature, and a call signature, and a construct signature."' Does that make sense🤔?

    type: feature 
    opened by puffy-puffy 1
  • ✨ Feature: redirect /objects-and-interfaces to /interfaces

    ✨ Feature: redirect /objects-and-interfaces to /interfaces

    Bug Report Checklist

    • [X] I have searched for related issues and found none that matched my issue.
    • [X] This is the appropriate issue form for the bug I would like to report.

    Expected

    I left a URL in the book like https://learningtypescript.com/objects-and-interfaces (the original name of the chapter). Now the site will have to support redirecting that to https://learningtypescript.com/interfaces in perpetuity. 😂

    Actual

    No URL exists yet.

    Additional Info

    This should be doable with a vercel.json. https://vercel.com/docs/cli#project/redirects

    type: feature accepting prs 
    opened by JoshuaKGoldberg 1
  • ✨ Feature: add an

    ✨ Feature: add an "open in TS playground" link to article TS code blocks

    Overview

    Article code blocks have a "copy" link in their top-right at the moment. It'd be nice to add another button that opens a TS code block in typescriptlang.org/play.

    type: feature accepting prs area: articles 
    opened by JoshuaKGoldberg 1
  • 💅 Polish: Run a performance audit

    💅 Polish: Run a performance audit

    Tooling Report Checklist

    • [X] I have pulled the latest main branch of the repository.
    • [X] I have searched for related issues and found none that matched my request.
    • [X] This is the appropriate issue form for the tooling issue I would like to report.

    Expected

    The site performance is pretty good as-is. But, it can be better.

    Actual

    At least the Google Font embed is too much data. And I should check whether that font (and any other resources) should be loaded from the learningtypescript.com domain.

    Additional Info

    Marking as blocked similar to #15.

    status: blocked area: tooling type: performance 
    opened by JoshuaKGoldberg 1
  • 💅 Polish: Run a design audit

    💅 Polish: Run a design audit

    Tooling Report Checklist

    • [X] I have pulled the latest main branch of the repository.
    • [X] I have searched for related issues and found none that matched my request.
    • [X] This is the appropriate issue form for the tooling issue I would like to report.

    Expected

    Once the site is mostly stable, I'll want to do another pass to catch any more UI bugs.

    Actual

    I know there are at least a few discrepancies...

    Additional Info

    Marking as blocked until the frontend is more stabilized.

    area: user interface type: polish 
    opened by JoshuaKGoldberg 1
  • 🐛 Bug: Run an accessibility audit on the site

    🐛 Bug: Run an accessibility audit on the site

    Before You File a Bug Report Please Confirm You Have Done The Following...

    • [X] I have pulled the latest main branch of the repository.
    • [X] I have searched for related issues and found none that matched my request.
    • [X] This is the appropriate issue form for the tooling issue I would like to report.

    Expected

    Accessibility is not a bolt-on!

    Actual

    I haven't done a deep audit in a few features. It's mostly accessible now (and I'm checking each PR I send), but I want to fully double-check after most polish is done.

    Additional Info

    Marking as blocked until the frontend is more stabilized.

    area: user interface 
    opened by JoshuaKGoldberg 1
  • Add a

    Add a "/starters" URL

    It's mentioned in the book. Putting this here to remind myself 🙂

    [NOTE]
    ====
    Many JavaScript projects use dedicated transpilers such as Babel (https://babeljs.io) instead of TypeScript's own to transpile source code into runnable JavaScript.
    You can find a list of common project starters on https://learning-typescript.com/starters.
    ====
    
    opened by JoshuaKGoldberg 1
  • Article: how to override third party types?

    Article: how to override third party types?

    A question brought up on my Twitch stream today: overriding types of third party libraries if the types aren't made to be extended?

    Example: some-library exports an interface MyData, and in your code you need to have an extra property myProperty added to all instances of MyData?

    A more specific example: https://github.com/versatica/mediasoup/blob/41e2f52786a61942209512ca5ce20798baad8b96/node/lib/Worker.d.ts#L39

    Thanks voltaryx on Twitch for bringing up! 🙌

    type: article 
    opened by JoshuaKGoldberg 1
  • Article: why excluded files still get included

    Article: why excluded files still get included

    https://www.typescriptlang.org/tsconfig#exclude

    Specifies an array of filenames or patterns that should be skipped when resolving include.

    Important: exclude only changes which files are included as a result of the include setting. A file specified by exclude can still become part of your codebase due to an import statement in your code, a types inclusion, a /// <reference directive, or being specified in the files list.

    It is not a mechanism that prevents a file from being included in the codebase - it simply changes what the include setting finds.

    This gets asked a lot. I should write an article that mentions what's happening and workarounds.

    https://discord.com/channels/508357248330760243/942074070860705852/1008777933957120000

    type: article 
    opened by JoshuaKGoldberg 0
  • Article: Why narrowing without a discriminant needs the 'in' operator

    Article: Why narrowing without a discriminant needs the 'in' operator

    I actually don't remember the historical reasons for this is the case, but have the rule memorized...

    In general, TypeScript won't let you access properties of a value that aren't defined in all possible types the value might be. So you can't do things like:

    declare const value: { a: string } | { b: string };
    
    value.a;
    //    ~
    // Property 'a' does not exist on type '{ a: string; } | { b: string; }'.
    //   Property 'a' does not exist on type '{ b: string; }'.
    

    However, you can do an existence check with the in operator. That will work as a form of type narrowing:

    declare const value: { a: string } | { b: string };
    
    if ('a' in value) {
      value.a; // Ok
      // ^? { a: string }
    }
    

    https://discord.com/channels/508357248330760243/942074070860705852/1008521509532356649

    type: article 
    opened by JoshuaKGoldberg 0
  • Article: Using generics map from object keys to values

    Article: Using generics map from object keys to values

    This is covered in the book, but keeps coming up as something people ask for help with. There's a difference between taking in a keyof typeof type and taking in a type parameter that extends the type.

    Example: https://discord.com/channels/508357248330760243/942074070860705852/1008521509532356649

    const scratchData = {
      apple: "fruit",
      beet: "vegetable",
    } as const;
    
    
    function getDataFixed(key: keyof typeof scratchData) {
      return scratchData[key];
    }
    
    const fromApple = getDataFixed("apple");
    //    ^? "fruit" | "vegetable"
    
    function getDataGeneric<Key extends keyof typeof scratchData>(key: Key) {
      return scratchData[key];
    }
    
    const fromAppleGeneric = getDataGeneric("apple");
    //    ^? "fruit"
    
    type: article 
    opened by JoshuaKGoldberg 0
  • Article: Declaring CSS files in .d.ts

    Article: Declaring CSS files in .d.ts

    Overview

    Inspired by this thread: https://twitter.com/rauschma/status/1554533344838311937

    I'd like to roughly put the strategies mentioned there in article form:

    • css.d.ts
    • typed-css-modules
    type: article 
    opened by JoshuaKGoldberg 0
Owner
Josh Goldberg
staff web platform @Codecademy 💖✨ prev @microsoft ✨ open source things ✨ @typescript contributor, @typescript-eslint maintainer, side of accessibility
Josh Goldberg
A Typescript companion to the book A Common-Sense Guide to Data Structures and Algorithms by Jay Wengrow

This repository aims to be a companion to the book A Common-Sense Guide to Data Structures and Algorithms by Jay Wengrow. I rewrote most of the data s

Alexandre Lim 29 Dec 3, 2022
An ongoing curated list of frameworks, books, articles, talks, screencasts, recordings, libraries, learning tutorials and shiny resources about Javascript Development.

Javascript Frameworks Development Welcome to the world of Javascript Frameworks. An ongoing curated list of frameworks, books, articles, talks, screen

Paul Veillard 3 Jul 31, 2022
AweSome Book App displays the book details entered by user and saves the information in Local storage. User can add and remove a book title/author to the library and from the library.

Awesome Book App with ES6 Used npm init -y command to create package.json file. Created the entry point for the JavaScript code called index.js Create

Krishna Prasad Acharya 8 Aug 15, 2022
This is a single page web application that keeps tracks of books. Book details captured are the book title, author and ISBN. User can add a book, view a list of books and also remove any un wanted books.

Project Name This is a single page web application that keeps tracks of books. Book details captured are the book title, author and ISBN. User can add

Olivier 6 Nov 20, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
:books: The definitive guide to TypeScript and possibly the best TypeScript book :book:. Free and Open Source 🌹

TypeScript Deep Dive I've been looking at the issues that turn up commonly when people start using TypeScript. This is based on the lessons from Stack

Basarat Ali Syed 18.7k Jan 4, 2023
A curated list of projects, research initiatives, videoconferences and articles on artificial intelligence (AI) in Chile.

Artificial Intelligence Chile A curated list of projects, research initiatives, videoconferences and articles on artificial intelligence (AI) in Chile

Juan Francisco 12 Nov 2, 2022
A single-page application that allows users to keep track of their books. Users can add the book details (book title and author) and also, and the books can also be removed. Built with JavaScript, HTML, and CSS

Project Name Awesome book with ES6 Description the project. This is a single page application that allows users to keep track of their books. Users ca

Micheal Oguntayo 4 Oct 13, 2022
The Bookstore is a website where the user can display a list of books, add a book by providing a title, an author, and selecting from the categories, and remove a selected book.

Bookstore The Book Store is a website where the user can display a list of books, add a book and remove a selected book. Microverse's Bookstore API wa

Virag Kormoczy 9 Jan 1, 2023
A plugin that can query multiple APIs for movies, series, anime, games, music and wiki articles, and import them into your vault.

Obsidian Media DB Plugin A plugin that can query multiple APIs for movies, series, anime, games, music and wiki articles, and import them into your va

Moritz Jung 58 Dec 21, 2022
An API that allows you to scrape blog posts and articles and get a list of notes or a summary back.

EZAI-Web-Scraper An API that allows you to scrape blog posts and articles and get a list of notes or a summary back. Recommendations Use browserless.i

null 9 Dec 8, 2022
The Bookstore is a website that allows the user to :display a list of books , Add a book and remove a selected book.

Book Store The Bookstore is a website that allows the user to : -Display a list of books. -Add a book. -Remove a selected book. Built With ?? Basic CS

Nedjwa Bouraiou 4 Sep 6, 2022
BookStore is a website that allows a given user to view a list of books, to add a new book and remove a given book.

Project Name : BookStore CMS BookStore is a website that allows a given user to view a list of books, to add a new book and remove a given book. In or

Chris Siku 10 Aug 22, 2022
This is an app that displays a list of books, allow users add a book and remove a selected book.

BookStore This is an app that displays a list of books, allow users add a book and remove a selected book. Built With HTML CSS -React -Redux -JavaScri

ABDUL ALI 5 Jul 22, 2022
Awesome-book is an online library website where a user can store a collection of books. Different book can be added and removed. Built with JavaScript using Dom

Awesome-book Description Awesome-book is an online library website where a user can store a collection of books. Differents book can be added and remo

tarike bouari 8 Sep 9, 2022
Awesome Books project : An online Book Library. Storing book information using local storage and displaying it as a list on HTML page

This is project is my based on building an online Book Library. Storing book information using local storage and displaying it as a list on html page

Richard Chileya 7 Nov 11, 2022
Free to read e-paper with concise articles and many categories

THE FREE TIMES About The free times is a free-to-read e-paper with concise articles and many categories. My aim is to provide a nice newspaper like ex

Shivom Srivastava 2 Dec 16, 2022