이 글의 성격은 무엇인가요?
질문 / 문제 해결
내용을 설명해주세요
환경
@toss/tds-mobile: 2.3.0react,@types/react: 19.2.14typescript: 5.8.3
증상
AgreementV4.Text(및 AgreementV4.Badge)에 children을 넘기면 타입 에러가 납니다. 런타임은 정상 렌더되고 타입에서만 막힙니다.
재현 코드
import { AgreementV4 } from "@toss/tds-mobile";
export function Repro() {
return (
<AgreementV4.Text onPressEnd={() => {}}>
개인정보 수집·이용에 동의합니다
</AgreementV4.Text>
);
}
에러
TS2322: Type '{ children: string; onPressEnd: () => void; }' is not assignable to
type 'IntrinsicAttributes & AgreementV4TextProps & RefAttributes<HTMLDivElement>'.
Property 'children' does not exist on type
'IntrinsicAttributes & AgreementV4TextProps & RefAttributes<HTMLDivElement>'.
TS2559: Type '{ children: string; }' has no properties in common with
type 'IntrinsicAttributes & AgreementV4TextProps & RefAttributes<HTMLDivElement>'.
AgreementV4.Badge도 같은 증상입니다.
기타
찾아보니 이런분도 계셨었네요