From bba0d75181a7e2b454532a8f69a9cf245afaac0b Mon Sep 17 00:00:00 2001 From: Trevor Blades Date: Wed, 3 Jan 2024 11:35:56 -0800 Subject: [PATCH] Simplify country class --- src/schema.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/schema.ts b/src/schema.ts index 915fb55..9672236 100644 --- a/src/schema.ts +++ b/src/schema.ts @@ -28,13 +28,7 @@ const builder = new SchemaBuilder({ }); class Continent { - code: string; - name: string; - - constructor(code: string, name: string) { - this.code = code; - this.name = name; - } + constructor(public code: string, public name: string) {} } builder.objectType(Continent, {