Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript基礎 #5

Open
rensanrenren opened this issue Dec 10, 2023 · 0 comments
Open

Typescript基礎 #5

rensanrenren opened this issue Dec 10, 2023 · 0 comments

Comments

@rensanrenren
Copy link
Owner

rensanrenren commented Dec 10, 2023

「型」についての勉強

プリミティブ型

プリミティブ型は以下の7つ。よく型の指定で出てくるものだね。

  1. Boolean型:trueとfalseの真偽値を扱うデータ型
  2. Number型:シンプルに数値を扱うデータ型
  3. BigInt型:ES2020で追加された、Number型で扱えない特殊な数値を扱うためのデータ型
  4. String型:テキストなどの文字列を扱うデータ型
  5. Symbol型:Symbol()関数を呼び出すと生成される。シンボル値という固有の識別子を表現する値。
  6. Null型:値が存在しないことを意味するデータ型。
  7. Undefined型:値が未定義であることを意味するデータ型。Undefinedはリテラルではなくてただのグローバル変数である。

オブジェクト型

プリミティブ型でないものは基本的にすべてオブジェクト型。

  • オブジェクト
  • 配列
  • 関数
  • 正規表現
  • Data

React特有の型定義について

ここは難しいので丁寧に見ていく。

props

useState

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant