Open patricklafrance opened 4 years ago
Hi!
With 3.2.1 the default values were generated for most of the types. After upgrading to 3.3.0 all the default values are gone.
My test cases are available here: https://github.com/storybookjs/storybook/blob/next/examples/cra-ts-kitchen-sink/src/stories/docgen-tests/types/ts-types.tsx#L93
Here's an output of what I receive from the loader after upgrading to 3.3.0:
{defaultValue: null, description: "", name: "any", required: true, type: {…}} {defaultValue: null, description: "", name: "string", required: true, type: {…}} {defaultValue: null, description: "", name: "bool", required: true, type: {…}} {defaultValue: null, description: "", name: "number", required: true, type: {…}} {defaultValue: null, description: "", name: "voidFunc", required: true, type: {…}} {defaultValue: null, description: "", name: "funcWithArgsAndReturns", required: true, type: {…}} {defaultValue: null, description: "", name: "funcWithunionArg", required: true, type: {…}} {defaultValue: null, description: "", name: "funcWithMultipleUnionReturns", required: true, type: {…}} {defaultValue: null, description: "", name: "funcWithIndexTypes", required: true, type: {…}} {defaultValue: null, description: "", name: "symbol", required: true, type: {…}} {defaultValue: null, description: "", name: "interface", required: true, type: {…}} {defaultValue: null, description: "", name: "genericInterface", required: true, type: {…}} {defaultValue: null, description: "", name: "arrayOfPrimitive", required: true, type: {…}} {defaultValue: null, description: "", name: "arrayOfComplexObject", required: true, type: {…}} {defaultValue: null, description: "", name: "tupleOfPrimitive", required: true, type: {…}} {defaultValue: null, description: "", name: "tupleWithComplexType", required: true, type: {…}} {defaultValue: null, description: "", name: "defaultEnum", required: true, type: {…}} {defaultValue: null, description: "", name: "numericEnum", required: true, type: {…}} {defaultValue: null, description: "", name: "stringEnum", required: true, type: {…}} {defaultValue: null, description: "", name: "enumUnion", required: true, type: {…}} {defaultValue: null, description: "", name: "recordOfPrimitive", required: true, type: {…}} {defaultValue: null, description: "", name: "recordOfComplexObject", required: true, type: {…}} {defaultValue: null, description: "", name: "intersectionType", required: true, type: {…}} {defaultValue: null, description: "", name: "intersectionWithInlineType", required: true, type: {…}} {defaultValue: null, description: "", name: "unionOfPrimitive", required: true, type: {…}} {defaultValue: null, description: "", name: "unionOfComplexType", required: true, type: {…}} {defaultValue: null, description: "", name: "nullablePrimitve", required: false, type: {…}} {defaultValue: null, description: "", name: "nullableComplexType", required: false, type: {…}} {defaultValue: null, description: "", name: "nullableComplexTypeUndefinedDefaultValue", required: false, type: {…}} {defaultValue: null, description: "", name: "readonlyPrimitive", required: true, type: {…}} {defaultValue: null, description: "", name: "typeAlias", required: true, type: {…}} {defaultValue: null, description: "", name: "aliasesIntersection", required: true, type: {…}} {defaultValue: null, description: "", name: "aliasesUnion", required: true, type: {…}} {defaultValue: null, description: "", name: "genericAlias", required: true, type: {…}} {defaultValue: null, description: "", name: "namedStringLiteralUnion", required: true, type: {…}} {defaultValue: null, description: "", name: "inlinedStringLiteralUnion", required: true, type: {…}} {defaultValue: null, description: "", name: "namedNumericLiteralUnion", required: true, type: {…}} {defaultValue: null, description: "", name: "inlinedNumericLiteralUnion", required: true, type: {…}}
Thank you,
Patrick
Hi!
With 3.2.1 the default values were generated for most of the types. After upgrading to 3.3.0 all the default values are gone.
My test cases are available here: https://github.com/storybookjs/storybook/blob/next/examples/cra-ts-kitchen-sink/src/stories/docgen-tests/types/ts-types.tsx#L93
Here's an output of what I receive from the loader after upgrading to 3.3.0:
Thank you,
Patrick