여기서 핵심은,
'Object literal may only specify known properties, and 'hourDigital' does not exist in type ~~' 이 문장이다.
Object literal may only specify known properties
key
와 value
로 구성된다. method
라 부른다.https://bobbyhadz.com/blog/typescript-object-literal-may-only-specify-known-properties
이 사이트에 들어가서 이 부분을 읽어봐라. !
The "Object literal may only specify known properties" error occurs when a property in an object literal doesn't exist in the object's type.
To solve the error, make sure to type all of the object's properties and fix spelling errors in property names if you have any.
Here is an example of how the error occurs.
Object literal may only specify known properties
이 에러는 모든 타입을 다 써주라는 뜻이다.
그래서 타입을 이렇게 써줬다!!!
그러니까 결국,
hourDigital 만의 문제는 아니였다.