andy2
(Andy Cetnarskyj)
May 14, 2022, 7:12am
1
Hello,
I have deployed my portfolio using Primisic and Next.Js and most of the site is in TS. However, I was unable to get the slices to be types because I can't find the information in the docs.
All I can find is this one example file on Github .
Has anyone found another source or article that was helpful?
Thanks in Advance
Pau
May 16, 2022, 9:55am
3
Hello @andy2 , thanks for reaching out!
We don't yet have specific documentation for TypeScript. @prismicio /types are the source of types for Prismic data. Slices need to be typed with it. For the moment, we have the docs for the manual CLI here: GitHub - prismicio/prismic-ts-codegen: An experimental Prismic model-to-TypeScript-type generator. .
andy2
(Andy Cetnarskyj)
May 21, 2022, 6:36am
5
thanks @Pau , I'm still new to Typescript so maybe I wait until the official docs come out for slices.
1 Like