Open stefanprobst opened 2 years ago
Documentation task moved to contentlayerdev/website#62.
I changed the title to reflect the CL-specific issue. cc @schickling
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
currently when defining a computed field of type
enum
like this:this generates a ts schema:
note that the regular
enum
field is correct, but the computedenum
field is of typeenum
i guess this is because of https://github.com/contentlayerdev/contentlayer/blob/dcc48858f7643f882a72a9cc5941deb36bbb1ecf/packages/%40contentlayer/core/src/generation/generate-types.ts#L120
steps to reproduce:
git clone git@github.com:stefanprobst/issue-contentlayer-computed-field-types.git
cd issue-contentlayer-computed-field-types
npm i
npm run generate
cat .contentlayer/generated/types.d.ts