Inflearn Community Q&A
getStaticProps typescript 선언
Written on
·
443
0
export const getStaticProps : GetStaticProps = async () => { const allPostsData = getSortedPostsData(); return { props : {allPostsData} }}getStaticProps 뒤에 : GetStaticProps는 typescript 때문에 쓰는게 맞나요? 흔히 생각하는 typescript의 타입 (number, boolean 등등)은 아닌거 같은데 이것은 뭔가요??
Next.jstddtypescriptreduxreact
Answer 1
0
John Ahn
Instructor
안녕하세요!
넵 타입 때문에 쓰는 게 맞습니다.
저 안에 많은 타입들이 number, boolean 등으로 지정되어 있습니다 ~
오른쪽 클릭으로 Go to Definition 누르시면 타입을 보실 수 있습니다.
감사합니다.





