Skip to content

Commit

Permalink
Refactor image reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswilddev committed Dec 28, 2020
1 parent e838801 commit 4501872
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions catalog/catalog-image/catalog-image-type/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type CatalogImageType = `pixelArt`;
16 changes: 16 additions & 0 deletions catalog/catalog-image/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { CatalogImageType } from "./catalog-image-type";

export { CatalogImageType } from "./catalog-image-type";

export type CatalogImage = {
/**
* The second half of the URL for the image. Must refer to an existing PNG or
* JPEG.
*/
readonly urlSuffix: string;

/**
* The type of image content.
*/
readonly type: CatalogImageType;
};
8 changes: 5 additions & 3 deletions catalog/catalog-localization/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { CatalogImage } from "../catalog-image";

/**
* A localization of a catalog.
*/
Expand All @@ -14,8 +16,8 @@ export type CatalogLocalization = {
readonly uiName: string;

/**
* The second half of the URL for the localization's icon. Must refer to an
* existing PNG or JPEG.
* The square icon used to represent the localization. May be cropped to a
* circle.
*/
readonly iconUrlSuffix: string;
readonly icon: CatalogImage;
};
2 changes: 2 additions & 0 deletions catalog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export {
CatalogGame,
} from "./catalog-game";

export { CatalogImage } from "./catalog-image";

export { CatalogLocalization } from "./catalog-localization";

/**
Expand Down

0 comments on commit 4501872

Please sign in to comment.