
vue3 와 typescript로 개발중 'Object is possibly undefined' 에러가 발생했다. 딱 보아하니 'props로 땡겨온 변수가 undefined 일 수 있잖아' 라는 에러 같았다. 하지만 나는 해당 변수의 default 까지 선언을 해준 상황이라 절대 undefied 혹은 null 값이 될 수 없는 상황이였다.. 이를 해결하기 위해 해당 변수가 undefined 될 수 없다고 강제 하기로 했고, 느낌표(!) non-null 단어 연산자를 사용했다.사용법은 간단히 변수 옆에 !를 붙여주면 된다. 이는 확정 할당 단언(Definite Assignment Assertions) 이라고 한다. 변수에 값이 무조건 할당되어있다고 컴파일러에게 전달하여 값이 없어도 변수 또는 객체를 사용할..
프론트엔드/Vue.js
2022. 11. 18. 10:36
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- leva
- react three fiber
- react three fiber leva
- vue3
- typescript gsls
- Vue.js
- react ref reative
- 394 decode string
- next.js import glsl
- three.js leva
- react 3d 에니메이션
- [leetcode] 394. decode string js
- vue reactive
- react vue
- vue ref
- ts glsl
- attempted import error: bvh_struct_definitions' is not exported from './gpu/bvhshaderglsl.js' (imported as 'bvhshaderglsl').
- react 3d animation
- 394. decode string js
- vue react
- eslint
- 394. decode string javascript
- react 3d text
- vue
- [leetcode] 394. decode string
- react 3d
- react glsl
- react fiber 3d
- react leva
- webpack glsl
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함