> For the complete documentation index, see [llms.txt](https://easonwang.gitbook.io/web_advance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://easonwang.gitbook.io/web_advance/typescript.md).

# Typescript

## Basic Types

<https://www.typescriptlang.org/docs/handbook/basic-types.html>

## Cheatsheet

<https://github.com/typescript-cheatsheets/react>

## Create-react-app 加上 typescript

{% embed url="<https://create-react-app.dev/docs/adding-typescript/>" %}

## 其他知識

unknown vs any

{% embed url="<https://stackoverflow.com/a/51439876/4622645>" %}

<> 泛型

> 可用來讓型別成為變數，先不指定，但是可以協助讓參數與返回值的型別設為相同的型別

<https://www.tslang.cn/docs/handbook/generics.html>
