Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Apr 24, 2024
1 parent 120ba2d commit 9331cd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
}
4 changes: 2 additions & 2 deletions src/printer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ function mapJoin<T>(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"""';
}

Expand Down

0 comments on commit 9331cd0

Please sign in to comment.