From dbedecc9002e3eb19f931c5eb3b3019fdf746d80 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Mon, 3 Jan 2022 18:40:09 -0700 Subject: [PATCH] Prefix interfaces for data with a capital I --- common/src/index.ts | 8 +++++++- common/src/types/Colour.ts | 2 +- common/src/types/Spaceship.ts | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 common/src/types/Spaceship.ts diff --git a/common/src/index.ts b/common/src/index.ts index 74fa103..6b54854 100644 --- a/common/src/index.ts +++ b/common/src/index.ts @@ -1,4 +1,10 @@ +// Enums export { Status } from "./enums/Status"; -export { Colour } from "./types/Colour"; + +// Interfaces +export { IColour } from "./types/Colour"; +export { ISpaceship } from "./types/Spaceship"; + +// Server-Client Communications export * from "./types/events/SaveShip"; export * from "./types/ServerResponse"; \ No newline at end of file diff --git a/common/src/types/Colour.ts b/common/src/types/Colour.ts index 6aa2b9f..68d5041 100644 --- a/common/src/types/Colour.ts +++ b/common/src/types/Colour.ts @@ -1,4 +1,4 @@ -export interface Colour { +export interface IColour { name: string; hex: string; } \ No newline at end of file diff --git a/common/src/types/Spaceship.ts b/common/src/types/Spaceship.ts new file mode 100644 index 0000000..ffb34cb --- /dev/null +++ b/common/src/types/Spaceship.ts @@ -0,0 +1,4 @@ +export interface ISpaceship { + name: string; + id: string; +} \ No newline at end of file