Coder Social home page Coder Social logo

gibbok / typescript-book Goto Github PK

View Code? Open in Web Editor NEW
8.2K 51.0 511.0 4.83 MB

The Concise TypeScript Book: A Concise Guide to Effective Development in TypeScript. Free and Open Source.

Home Page: https://gibbok.github.io/typescript-book/

License: Other

TypeScript 46.54% Shell 3.58% Makefile 1.01% Python 25.98% JavaScript 6.56% MDX 11.65% CSS 4.69%
book learn-typescript typescript typescript-book typescript-guide typescript-guidebook typescript-language typescript-learning typescript-tutorials free

typescript-book's People

Contributors

aaaaaamao avatar angleshe avatar davidbiesack avatar fain182 avatar frazar avatar gibbok avatar jerrylususu avatar nnecec avatar pietrodn avatar rmarasigan avatar tamatamvan avatar wrrwrr111 avatar xikou1314 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

typescript-book's Issues

Possible Update on Revered Mapping of Enums?

I have been using TypeScript for a while but haven't checked out any materials that systematically explain its inner workings. I found this book to be truly helpful. Thank you for your wonderful work!

In the section about reversed mapping of enums, there is a code example showcasing a Language enum with 2 string enum members. However, there are a few minor issues with that example. Firstly, it does not demonstrate how the reverse mapping maps the value back to its key. Secondly, according to the TypeScript documentation, string enum members do not automatically generate a reverse mapping.

Perhaps the following example would be better? I can create a pull request if you find it acceptable.

enum Grade {
  A = 90,
  B = 80,
  C = 70
}

// reverse mapping maps an enum value back to its corresponding key
const myGrade = Grade.A;
console.log(Grade[myGrade]) // => "A"
console.log(Grade[90]) // => "A"

Setup GitHub Actions

Setup GitHub Actions, we need to ensure that we are able to:

  • Check for any Markdown lint errors.
  • Compile all TypeScript snippets and check for errors.
  • Check for formatting issues using Prettier.

If any errors are found during these checks, the build should fail (some scripts are already done in folder tools).

Unable to send to kindle

I have an error when using the "send to kindle" functionnality with the epub version. Kindle does not provide the detail of the error. However, after processing the epub in an epub validator, it reports the following issues :

Validating using EPUB version 3.2 rules.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(104,29): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(118,59): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(248,25): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(319,26): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(322,53): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(325,45): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(330,52): Fragment identifier is not defined.
Check finished with errors
Messages: 0 fatals / 7 errors / 0 warnings / 0 infos
EPUBCheck completed

After extracting the epub, indeed, in the file epub/EPUB/text/ch001.xhtml, you have a few links with fragment identifier which do not exist in the ch001.xhtml file.

For example : #typescript-configuration-file-tsconfigjson

<li><a href="ch001.xhtml#configuration">Configuration</a></li>
<li><a href="#typescript-configuration-file-tsconfigjson">TypeScript Configuration File ​​tsconfig.json</a>
<ul>
<li><a href="ch001.xhtml#target">target</a></li>

I think you used the README.md file to generate the epub. However between pandoc and Github, they don't process anchor the same way. So for example, the heading Get & Set in Github is generated as get--set but pandoc generates get-set. You have other cases with special chars like . too.

Note that there is no carriage return before the ## Introduction heading too so it is not process correctly by pandoc.

However I am not sure if all this is the cause of the error on kindle side.

Format Error

Format code snippet (line 287) in the Chinese version.

Property does not exist on type '{ x: number; }'.

some advice⚗

As your audience grows, consider adding some online experiences to help your readers. Here are my suggestions:

  1. Add an online playground, you can practice while learning, practice can better deepen understanding and memory
  2. Add the right navigation bar for quick location
  3. Adding a bookmark feature, I want to store some difficult points in a place that can be quickly returned for easy reading back

Do you accept a PR with Spanish translation?

I think it is a very good contribution and I would like to contribute with the Spanish translation, so we all could enjoy this content.
I look forward to hearing from you.
Best regards.

Persian Translation?

Hello,

I hope you're doing well. I recently came across your repository. I noticed that your repository doesn't have a Persian translation, and I'm interested in contributing by adding a Persian translation if you're open to it.

As a Persian-speaking user, I believe adding a Persian translation to your repository can help the Persian-speaking developer community benefit from your project to the fullest extent.

Are you interested in the idea of adding a Persian translation to your repository? If you're open to it, I would be delighted to collaborate and provide smooth and accurate translations for you.

I'm looking forward to hearing from you. If you have any questions or requests, please let me know.

Call for Contributions: Translations Needed for The Concise TypeScript Book

I would appreciate any contributions to translations of the book. To submit a contribution, please make a pull request, ensuring that you:

  • Follow the structure outlined for the book.
  • Translate comments within the code.
  • Use the tools in the 'tools' folder to check for markdown formatting, TypeScript compilation of snippets, and website generation.

Thank you for your help and support on this project 🙇

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.