Skip to content

Drop unnecessary namespaces #19

@rjz

Description

@rjz

E.g. in src/reducers/Store, the Store namespace can be flattened out:

export type Counter = {
  value: number,
}

export type All = {
  counter: Counter,
  isSaving: boolean,
  isLoading: boolean,
  error: string,
}

...and its effect still captured nicely via import:

import * as store from './src/reducers/store'

const state: store.All = // ...

HT @egmanoj for the suggestion!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions