개발일지
ts 7016 에러 해결법
케이오스
2021. 1. 16. 06:35
// @ts-ignore
를 추가해주면 해당 에러는 안 일어남
tsconfig.json
compilerOptions에 path: [] 추가해주는 것보다
간단하고,
"noImplicitAny": false 해줬을 때 발생하는 부가적인 문제도 안 발생해서 편했음
import React, { useState } from "react";
// @ts-ignore
import DateTimePicker from "react-datetime-picker";
export const DTP = () => {
const [value, onChange] = useState(new Date());
const onClick = () => console.log("value: ", value);
return (
<div>
<span className="font-bold text-yellow-600">
this is date time picker
</span>
<DateTimePicker onChange={onChange} value={value} />
<button onClick={onClick}>show value</button>
</div>
);
};

근데 편집한 것과 결과물이 달라서 불편하네...
색깔이 들어가야 보기 편한데 ☹☹