The documentation states:
Non-required attributes automatically have | null appended to their type.
However after generating types, there is not a single instance of null in the generated files, despite dozens of attributes being non-required.
Node version: 16.17.0
Package version: 3.4.0
Yarn script:
yarn contentful-typescript-codegen --output src/types/contentful/types.generated.ts --fieldsOnly && contentful-typescript-codegen --output server/types/contentful/types.generated.ts --fieldsOnly
Expected output:
/** Add To Bag Text */
addToBagText?: string | null;
/** Bag Text */
bagText?: string | null;
/** Added To Bag Text */
addedToBagText?: string | null;
Actual output:
/** Add To Bag Text */
addToBagText?: string | undefined;
/** Bag Text */
bagText?: string | undefined;
/** Added To Bag Text */
addedToBagText?: string | undefined;
Any debugging guidance would be greatly appreciated! Thank you!