README and Interfaces
Updated the IType interface and the README file that includes installation instructions and usage examples
This commit is contained in:
@ -2,7 +2,7 @@ import { ISubType } from '../interfaces/subType';
|
||||
import { QueryBuilder } from '../queryBuilder';
|
||||
|
||||
export class SubType implements ISubType {
|
||||
types: string[];
|
||||
type: string;
|
||||
|
||||
constructor() {}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ import { ISuperType } from '../interfaces/superType';
|
||||
import { QueryBuilder } from '../queryBuilder';
|
||||
|
||||
export class SuperType implements ISuperType {
|
||||
types: string[];
|
||||
type: string;
|
||||
|
||||
constructor () {}
|
||||
|
||||
|
||||
@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -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';
|
||||
@ -1,3 +1,3 @@
|
||||
export interface ISubType {
|
||||
types: string[];
|
||||
type: string;
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
export interface ISuperType {
|
||||
types: string[];
|
||||
type: string;
|
||||
}
|
||||
@ -1,7 +1,3 @@
|
||||
export interface IType {
|
||||
type: string;
|
||||
value: string;
|
||||
|
||||
resource(): string;
|
||||
all(): IType[];
|
||||
}
|
||||
Reference in New Issue
Block a user