Skip to content

Commit

Permalink
refactor: rename DataPoint to Event
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Rename `DataPoint` to `Event` so it is more in line
with the overall terminology used with the databuffer's backend.
If you specifically used the type name in your code, then you will need
to change it accordingly. If you only used type inference, you don't
need to change your code.
  • Loading branch information
Daniel J. Lauk committed Mar 27, 2020
1 parent 53e1554 commit b48b6e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- **BREAKING CHANGE**: rename type `DataPoint` to `Event`
- rename enums to singular
- improve doc comments

Expand Down
6 changes: 3 additions & 3 deletions src/query-data/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ export interface QueryResponseItem {
/**
* data contains the data retrieved from the API.
*/
data: DataPoint[]
data: Event[]
}

/**
* DataPoint defines a single point of data returned for a [[Channel]]
* Event defines a single point of data returned for a [[Channel]]
* within a [[QueryResponseItem]].
*
* @remarks
* Which fields are present depends on which fields were requested in
* the original data query.
*/
export interface DataPoint {
export interface Event {
[EventField.GLOBAL_DATE]?: string
[EventField.GLOBAL_MILLIS]?: number
[EventField.GLOBAL_SECONDS]?: number
Expand Down

0 comments on commit b48b6e1

Please sign in to comment.