일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- Testing
- http3
- custom command
- vue3
- Cypress
- msw
- CSS
- web vital
- 선택자
- aws
- 비동기
- QUIC
- TLS
- devtools
- e2e
- vue
- JavaScript
- ViTE
- CloudFlare
- rendering
- api test
- caching
- csr
- svelte
- import.meta.env
- https
- ts error
- vue-cli
- SSR
- typeScript
- Today
- Total
목록ts error (4)
Develop Note by J.S.

verbatimModuleSyntax Typescript 5.0 부터 Module elision(생략)를 명확하게 할 수 있는 옵션입니다. 만약 Type 지정만을 위한 import일 경우 빌드 시 해당 import가 삭제(elision)되는데, 해당 옵션으로 인해, type지정을 위한 import인 경우 type-only 형식으로 import해야 합니다. 1) Error Message 2) Type 키워드 사용

아래와 같은 TS2345 Error 발생 시 1. cypress/global.d.ts 생성 // ./cypress/global.d.ts declare namespace Cypress { interface Chainable { dataCy(dataTestAttribute: string): Chainable } } 2. tsconfig.json // tsconfig.json cypress 경로 추가 "include": ["cypress/**/*.ts" ,"src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],

1. TS2339 Error Vite에서 환경변수 import.meta.env 사용 시 TS2339 Error 발생 2. 조치 방법 tsconfig.json compilerOptions.types에 "vite/client"를 추가하면 해결됩니다. //tsconfig.json "compilerOptions": { ... "types": ["node", "vite/client"], }

Vite로 Vue Project 생성 시 아래와 같은 에러가 발생합니다 . 이때 ./src/ 하위에 shims-vue.d.ts 타입 추론 파일을 생성 한 뒤 아래 코드를 입력해주시면 에러가 발생되지 않습니다. declare module '*.vue' { import type { DefineComponent } from 'vue'; const component: DefineComponent; export default component; } declare module '*.scss'; //scss 사용 시