From 9331cd0f62a65cffd6c64c94462c0353db9c2519 Mon Sep 17 00:00:00 2001 From: jdecroock Date: Wed, 24 Apr 2024 19:10:45 +0200 Subject: [PATCH] fix types --- src/error.ts | 4 ++-- src/printer.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/error.ts b/src/error.ts index 5d0243f..6246cd4 100644 --- a/src/error.ts +++ b/src/error.ts @@ -45,11 +45,11 @@ export class GraphQLError extends Error { return { ...this, message: this.message }; } - toString() { + toString(): string { return this.message; } - get [Symbol.toStringTag]() { + get [Symbol.toStringTag](): string { return 'GraphQLError'; } } diff --git a/src/printer.ts b/src/printer.ts index 10a11bc..56a46f1 100644 --- a/src/printer.ts +++ b/src/printer.ts @@ -35,11 +35,11 @@ function mapJoin(value: readonly T[], joiner: string, mapper: (value: T) => s return out; } -function printString(string: string) { +function printString(string: string): string { return JSON.stringify(string); } -function printBlockString(string: string) { +function printBlockString(string: string): string { return '"""\n' + string.replace(/"""/g, '\\"""') + '\n"""'; }