You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds Size.bytes(), which allows to specify a Size class from an amount of bytes. Within the Size class, `Size.bytes( )` is the additional method added here to enable support for bytes as well as conversion to bytes with `Size.toBytes`.
For example,
```ts
const size = new Size.bytes(1024);
expect(size.toKibibytes).toEqual(1);
```
creates a new object of the Size class with a size of 1024 bytes and which is equivalent to 1 kibibyte.
Closes#24106.
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
0 commit comments