Refactor query interface imports

This commit is contained in:
Tee
2021-02-25 22:08:38 -05:00
parent 657605eaa0
commit 363bcfd321
3 changed files with 10 additions and 10 deletions

View File

@ -1,12 +1,12 @@
import { Client } from './client';
import { Card } from './classes/card';
import { Set } from './classes/set';
import { IQuery } from './interfaces/query';
import { Query } from './interfaces/query';
export class QueryBuilder {
static all<T extends Card | Set>(type: {new (): T}): Promise<T[]> {
const t = new type();
const params: IQuery[] = [{
const params: Query[] = [{
name: 'pageSize',
value: 250,
}];
@ -20,7 +20,7 @@ export class QueryBuilder {
return Client.get(t.resource(), id);
}
static where<T extends Card | Set>(type: {new (): T}, params: IQuery[]): Promise<T[]> {
static where<T extends Card | Set>(type: {new (): T}, params: Query[]): Promise<T[]> {
const t = new type();
return Client.get(t.resource(), params);