README and Interfaces

Updated the IType interface and the README file that includes installation instructions and usage examples
This commit is contained in:
Bradyn Glines
2018-01-20 17:31:59 -07:00
parent 94a0da5aaa
commit 4159cd65fe
8 changed files with 133 additions and 12 deletions

View File

@ -2,7 +2,7 @@ import { ISubType } from '../interfaces/subType';
import { QueryBuilder } from '../queryBuilder';
export class SubType implements ISubType {
types: string[];
type: string;
constructor() {}

View File

@ -2,7 +2,7 @@ import { ISuperType } from '../interfaces/superType';
import { QueryBuilder } from '../queryBuilder';
export class SuperType implements ISuperType {
types: string[];
type: string;
constructor () {}

View File

@ -1,8 +1,8 @@
import { IType } from '../interfaces/type';
import { QueryBuilder } from '../queryBuilder';
export class Type implements IType {
type: string;
value: string;
constructor() {}
@ -10,7 +10,10 @@ export class Type implements IType {
return 'types';
}
all(): IType[] {
throw new Error("Method not implemented.");
static all(): Promise<Type[]> {
return QueryBuilder.all(this)
.then(response => {
return response;
});
}
}

View File

@ -2,4 +2,5 @@ export { Card } from './classes/card';
export { Set } from './classes/set';
export { Type } from './classes/type';
export { SuperType } from './classes/superType';
export { SubType } from './classes/subType';
export { SubType } from './classes/subType';
export { IQuery } from './interfaces/query';

View File

@ -1,3 +1,3 @@
export interface ISubType {
types: string[];
type: string;
}

View File

@ -1,3 +1,3 @@
export interface ISuperType {
types: string[];
type: string;
}

View File

@ -1,7 +1,3 @@
export interface IType {
type: string;
value: string;
resource(): string;
all(): IType[];
}