일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- es6
- v9
- firebase
- array
- react localStorage
- Component
- 프리온보딩
- 자바스크립트
- 원티드
- react
- 리액트
- Frontend
- state
- 비트 연산자
- Reducer
- 파이어베이스
- CORS
- 프론트엔드
- localstorage
- til
- JS
- 브라우저
- JavaScript
- 프로그래머스
- TypeScript
- 컴포넌트
- 알고리즘
- Redux
- 타입스크립트
- axios
Archives
- Today
- Total
목록TS (2)
도리쓰에러쓰
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/dAbUGN/btrRDUhInRH/Fioj3DX0KiSL9zwApboVo0/img.png)
1. 원시 타입 (string, number, boolean, array) 1️⃣ String 문자열은 모두 string 타입이다. const name: string = 'dori'; const introduce: string = `My name is ${name}`; 2️⃣ Number TypeScript는 C언어 혹은 JAVA처럼 int, float, double 타입이 존재하지 않고, 모든 수는 단순히 number 타입이다. (2진수, 8진수, 10진수 등의 표현도 가능) const integer: number = 1; const float: number = 1.11; 3️⃣ Boolean 참(true) / 거짓(false) 두 가지 값만 가진다. const isTrue: boolean = true..
TypeScript/TypeScript
2022. 11. 21. 15:38
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/n1hPS/btrLqelJtfc/45EKdStTTwwseTGGug2jR1/img.png)
import { configureStore } from '@reduxjs/toolkit' import menuSlice from './menu-slice' const store = configureStore({ reducer: { menu: menuSlice.reducer }, }) redux 파일에 아래와 같이 코드가 작성되어 있을 때 store와 dispatch 타입 지정 방법은 아래와 같다. 1. store type export type storeType = ReturnType 2. dispatch type export type dispatchType = typeof store.dispatch
TypeScript/TypeScript
2022. 9. 5. 18:43