Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Default values are undefined after upgrading to 3.3.0 #70

Open
patricklafrance opened this issue Nov 18, 2019 · 0 comments
Open

Default values are undefined after upgrading to 3.3.0 #70

patricklafrance opened this issue Nov 18, 2019 · 0 comments

Comments

@patricklafrance
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant