Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- silent printing
- nextjs
- 이미지 데이터 타입
- ELECTRON
- custom printing
- github 100mb
- dvh
- animation
- device in use
- adb connect
- camera permission
- react-native-dotenv
- Failed to compiled
- augmentedDevice
- html
- ffi-napi
- vercel git lfs
- 티스토리 성능
- github lfs
- react-native
- github pdf
- Each child in a list should have a unique "key" prop.
- Git
- npm package
- Recoil
- electron-packager
- rolldown
- adb pair
- camera access
- Can't resolve
Archives
- Today
- Total
Bleeding edge
2022/12/16 - TIL 본문
1. 문제 : Title type

Title component의 type 에 문제가 있다.
export interface ITitleProps {
lv: 1 | 2 | 3 | 4 | 5 | 6 | '1' | '2' | '3' | '4' | '5' | '6';
hidden?: boolean;
focusable?: boolean;
children?: string;
restProps?: unknown[];
forwardedAs?: string | React.ComponentType<any>;
}
문제는 restProps?: unknowon[]에 문제가 있다. 지금 Title의 구조를 보면 heading tag가 바깥을 감싸고 있는 구조이기 때문에 heading에서 받을 수 있는 모든 attributes를 사용할 수 있어야한다.
export interface ITitleProps extends React.DetailedHTMLProps<React.HTMLAttributes, HTMLHeadingElement>{
lv?: 1 | 2 | 3 | 4 | 5 | 6 | '1' | '2' | '3' | '4' | '5' | '6';
hidden?: boolean;
focusable?: boolean;
children?: string;
forwardedAs?: string | React.ComponentType<any>;
}
extends를 이용하여 HTML Attributes를 확장하였다.
2. 새로운 문제
이를 수정하였지만

같은 에러가 work flow에서 발생하였다. 고민을 해본 결과 내가 라이브러리를 다시 npm publish 안하고 수정하여서 이렇게 에러가 발생했다. 이유는 github 자체에는 library가 안올라가고, work flow에서 npm install을 하여 라이브러리를 새로 설치하기 때문이다.
'ConnecTo' 카테고리의 다른 글
| 2022/12/21 - JSON-LD (0) | 2022.12.22 |
|---|---|
| 2022/12/19 - Styled Components vs Emotion (0) | 2022.12.20 |
| 2022/12/15 - History in React (0) | 2022.12.15 |
| 2022/12/14 - Gitpage env (0) | 2022.12.14 |
| 2022/12/13 - Github API (0) | 2022.12.14 |