Akusas
Akusas

Reputation: 529

Material UI TS1128: Declaration or statement expected for ButtonUnstyledProps

I have run into a problem when trying to build my application that is utilizing Material UI. I'm getting this Typescript error, and can't seem to find an answer regarding this problem

TypeScript error in C:/.../node_modules/@mui/base/ButtonUnstyled/index.d.ts(3,1):
Declaration or statement expected.  TS1128

    1 | export { default } from './ButtonUnstyled';
    2 | export { default as buttonUnstyledClasses, getButtonUnstyledUtilityClass, } from './buttonUnstyledClasses';
  > 3 | export type { default as ButtonUnstyledProps } from './ButtonUnstyledProps';
      | ^
    4 | export * from './ButtonUnstyledProps';
    5 | export { default as useButton } from './useButton';
    6 | export type { default as UseButtonProps } from './UseButtonProps';

I stumbled upon a similar problem for a different component from MUI and upgrading React to 16.14.0 fixed the problem, but has not fixed this one.

Upvotes: 1

Views: 812

Answers (1)

Akusas
Akusas

Reputation: 529

After a lot of testing and trying out different methods, then upgrading from TypeScript 3.7.2 to 3.8.3, then the problem was fixed, eventhough Material UI documentation says that it requires at least 3.5

Upvotes: 1

Related Questions