Skip to content

Commit

Permalink
Revert "Convert BaseConfig, BaseState` interfaces to types"
Browse files Browse the repository at this point in the history
This reverts commit 93a997b.
  • Loading branch information
MajorLift committed Feb 26, 2024
1 parent 0a66987 commit 8347a2a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
5 changes: 0 additions & 5 deletions packages/base-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- **BREAKING:** Convert `BaseConfig`, `BaseState` interfaces to types ([#3959](https://github.com/MetaMask/core/pull/3959))
- As types, `BaseConfig`, `BaseState` now extend `Record` and have an index signature of `string`.

## [4.1.1]

### Changed
Expand Down
14 changes: 10 additions & 4 deletions packages/base-controller/src/BaseControllerV1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,25 @@ export type Listener<T> = (state: T) => void;
* Base controller configuration
* @property disabled - Determines if this controller is enabled
*/
export type BaseConfig = {
// This interface was created before this ESLint rule was added.
// Convert to a `type` in a future major version.
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
export interface BaseConfig {
disabled?: boolean;
};
}

/**
* @type BaseState
*
* Base state representation
* @property name - Unique name for this controller
*/
export type BaseState = {
// This interface was created before this ESLint rule was added.
// Convert to a `type` in a future major version.
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
export interface BaseState {
name?: string;
};
}

/**
* @deprecated This class has been renamed to BaseControllerV1 and is no longer recommended for use for controllers. Please use BaseController (formerly BaseControllerV2) instead.
Expand Down

0 comments on commit 8347a2a

Please sign in to comment.