Skip to content

How to use readts; error Maximum call stack size exceeded #2

@Kamirus

Description

@Kamirus

Hi, I wanted to get a TSType out of Badge.d.ts mui component. I've looked at how it is done in purescript-react-mui.

When I call readInterfaceTypes on config that includes only Badge.d.ts I get an error:

RangeError: Maximum call stack size exceeded
    ...

It looks like there is an infinite recursion between getTSType and getWithAliasProps.

When I restricted the function argument for readInterfaceTypes so that it returns true only for "BadgeProps" and removed some fields (children, badgeContent, component) it terminated without the error.

I've added simple recursive type as an additional field in the interface and Maximum call stack size exceeded again

Am I doing something wrong?
Just for the record, I've cloned the purescript-react-mui installed it and built, but running the /synctypes caused the same error 😞

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions