I noticed that the IPerfumeData type was incomplete. There was some usage of any, and the type did not declare all possible properties.
This PR aims to improve this to ease the usage of the library.
Changes
Created the type IPerfumeStorageEstimate.
Extended IPerfumeData with IPerfumeStorageEstimate, IPerfumeDataConsumption, and IPerformanceEntry.
Replaced any usage with specific types.
Rewrote the function that maps the numbers in logData to comply with ESLint and type usage. A functional approach that does not modify the type passed as a parameter is preferable.
Tests
One test is failing, similar to when I ran the test suite on the main branch. Therefore, I assume that the tests are currently broken, and providing the exact same results validates the refactoring.
I did not provide an additional test since the PR introduces no new functional features.
Motivation
I noticed that the
IPerfumeData
type was incomplete. There was some usage ofany
, and the type did not declare all possible properties.This PR aims to improve this to ease the usage of the library.
Changes
IPerfumeStorageEstimate
.IPerfumeData
withIPerfumeStorageEstimate
,IPerfumeDataConsumption
, andIPerformanceEntry
.any
usage with specific types.logData
to comply with ESLint and type usage. A functional approach that does not modify the type passed as a parameter is preferable.Tests
One test is failing, similar to when I ran the test suite on the main branch. Therefore, I assume that the tests are currently broken, and providing the exact same results validates the refactoring.
I did not provide an additional test since the PR introduces no new functional features.