Skip to content

Block scoped variable usage  #12609

Description

@Truedrog

TypeScript Version: 2.1.1 / 2.2

Code

export function createMuiTheme(config = {} as any) {

  const {
    palette = createPalette(),
    breakpoints = createBreakpoints(),
    mixins = createMixins(breakpoints),
    typography = createTypography(palette),
    ...more
  } = config as any;

...
}

Expected behavior:
Compile without error.
Actual behavior:
TS2448:Block-scoped variable 'breakpoints' used before its declaration.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScript

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions