Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThemeProps not an exported interface #743

Closed
jednano opened this issue Mar 31, 2019 · 1 comment
Closed

ThemeProps not an exported interface #743

jednano opened this issue Mar 31, 2019 · 1 comment

Comments

@jednano
Copy link
Contributor

jednano commented Mar 31, 2019

Bug Report

In following along the documentation, I write the following default export:

export default theme(themeConfig)(Theme)

And get the following TypeScript error:

Default export of the module has or is using private name 'ThemeProps'.

Version

    "docz": "^1.0.0-rc.5",
    "docz-theme-default": "^1.0.0-rc.5",

Work-around

Manually edit theme.d.ts to export the ThemeProps interface:

export interface ThemeProps {
    db: Database;
    wrapper?: CT;
    linkComponent?: CT;
    children(WrappedComponent: CT): JSX.Element;
}
@trusktr
Copy link

trusktr commented Dec 21, 2019

I've opened a request to fix issues like these in TypeScript by bringing declaration files to parity with language features. microsoft/TypeScript#35822

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

No branches or pull requests

2 participants