Skip to content

Commit

Permalink
chore: use bound class method style
Browse files Browse the repository at this point in the history
Co-authored-by: Cristina Shaver <[email protected]>
  • Loading branch information
acao and cshaver committed May 15, 2020
1 parent 5f4ad6e commit c4f14af
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/monaco-graphql/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import * as languageFeatures from './languageFeatures';
import type { DocumentNode } from 'graphql';
import { SchemaResponse } from 'graphql-languageservice';

export class MonacoGraphQLApi {
private worker: languageFeatures.WorkerAccessor;
constructor({ accessor }: { accessor: languageFeatures.WorkerAccessor }) {
this.worker = accessor;
}

async getSchema(): Promise<SchemaResponse> {
getSchema = async () => {
const langWorker = await this.worker();
return langWorker.getSchemaResponse();
}
async parse(graphqlString: string): Promise<DocumentNode> {
};
parse = async (graphqlString: string) => {
const langWorker = await this.worker();
return langWorker.doParse(graphqlString);
}
};
}

0 comments on commit c4f14af

Please sign in to comment.