Skip to content

[Bug] compile error #332

Open
Open
@ktwbc

Description

@ktwbc

Version

1.0.2

Reproduction link

https://example.com

Operating System

macos

Device

macbook pro

Browser & Version

webstorm IDE latest

Steps to reproduce

  1. Just trying to run build
    TS2339: Property 'palette' does not exist on type 'Theme | undefined'.
    19 |
    20 | export default styled(Box)(({ theme, ownerState }: { theme?: Theme; ownerState: any }) => {
    > 21 | const { palette, typography, borders, functions } = theme;
    | ^^^^^^^
    22 | const { color } = ownerState;
    23 |
    24 | const { white, gradients } = palette;

What is expected?

should compile

What is actually happening?

breaks on compile


Solution

Additional comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions