Skip to content

Incorrect TypeScript definition of createStyles() #20864

@JasonHK

Description

@JasonHK
  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

According to the documentation, createStyles() should accept either a function or an object, but the TypeScript definition accept an object only.

Expected Behavior 🤔

The TypeScript definition of createStyles() should also accept a function.

Steps to Reproduce 🕹

CodeSandbox reproduction: https://codesandbox.io/s/sparkling-moon-yrppz?file=/src/index.ts

Context 🔦

Your Environment 🌎

Tech Version
Material-UI v4.9.12
React N/A
Browser N/A
TypeScript v3.8.3
etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions