Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EmptyObject

State base type for reducers created with combineReducers().

This type allows the createStore() method to infer which levels of the preloaded state can be partial.

Because Typescript is really duck-typed, a type needs to have some identifying property to differentiate it from other types with matching prototypes for type checking purposes. That's why this type has the $CombinedState symbol property. Without the property, this type would match any object. The symbol doesn't really exist because it's an internal (i.e. not exported), and internally we never check its value. Since it's a symbol property, it's not expected to be unumerable, and the value is typed as always undefined, so its never expected to have a meaningful value anyway. It just makes this type distinquishable from plain {}.

Hierarchy

  • EmptyObject

Index

Properties

[$CombinedState]?: undefined

Generated using TypeDoc