
경로를 깔끔하게 쓰고 싶어서 절대경로를 설정하는데 계속 모듈을 찾지 못하는 문제 발생..다른 분들의 블로그를 참고하면서 tsconfig.json파일과 vite.config.ts파일에 설정을 추가했는데도 여전히 경로를 찾지 못했다. 우선 처음에 작성한 설정 파일 내용이다.App.tsx 파일 vite.config.ts 파일import { defineConfig } from 'vite'import react from '@vitejs/plugin-react-swc'import tailwindcss from "tailwindcss";import path from 'path';// https://vite.dev/config/export default defineConfig({ plugins: [react()]..
Overloading(오버로딩)function overloading이나, method overloading이라고 부르는데 핵심은 오버로딩이다.오버로딩은 함수가 여러개의 Call Signatures를 가지고 있을 때 발생시킨다. 나쁜 예시type Add = { (a:number, b:number) => number (a:number, b:string) => number //---> 두개의 Call Signatures를 갖고 있다.}const add:Add = (a,b) => a+b //error! b is string|number//나쁜예시const add:Add = (a,b) => { if (typeof b === "string") return a; return a + b;} 실제 Next.js(Rea..
- Total
- Today
- Yesterday
- TypeScript
- 프로그래머스
- await
- Cleanup
- ts
- CLI
- 카카오로그인
- props
- useEffect
- NPM
- 재귀함수
- 오블완
- 리액트네이티브
- Async
- useState
- 리액트
- 오버로딩
- splice
- 티스토리챌린지
- create react app
- 자바스크립트
- 노마드
- 프로젝트회고록
- nomard
- ReactJS
- React
- 챌린지1일차
- 타입스크립트
- overloading
- slice
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |