Skip to content

Commit 24e2ce5

Browse files
committed
refactor(library/URI): avoids redundant format accessor in ImageURI
1 parent e4f8e56 commit 24e2ce5

File tree

1 file changed

+2
-6
lines changed
  • src/library/customTypes/UniformResourceIdentifier/Data/Image

1 file changed

+2
-6
lines changed

src/library/customTypes/UniformResourceIdentifier/Data/Image/index.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class ImageURI
1515
extends DataURI {
1616
public static readonly fileType = 'image';
1717

18-
private readonly _format: ImageURI_Format.Any;
18+
public readonly format: ImageURI_Format.Any;
1919

2020
public constructor(
2121
givenFormat: ImageURI_Format.Any,
@@ -27,11 +27,7 @@ class ImageURI
2727
givenEncoding,
2828
givenData,
2929
);
30-
this._format = givenFormat;
31-
}
32-
33-
public get format(): ImageURI['_format'] {
34-
return this._format;
30+
this.format = givenFormat;
3531
}
3632

3733
public override get mediaType(): DataURI['mediaType'] {

0 commit comments

Comments
 (0)