diff --git a/package.json b/package.json index 65538fb8..590a9a61 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ebryn/jsonapi-ts", - "version": "0.1.7", + "version": "0.1.8", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/resource.ts b/src/resource.ts index 52e325d4..05af8e15 100644 --- a/src/resource.ts +++ b/src/resource.ts @@ -7,6 +7,9 @@ export default abstract class Resource { attributes: ResourceTypeAttributes; relationships: ResourceTypeRelationships; + static attributes: ResourceTypeAttributes = {}; + static relationships: ResourceTypeRelationships = {}; + static get type() { return camelize(this.name); } diff --git a/tests/dummy/src/index.ts b/tests/dummy/src/index.ts index 758973e2..70547f94 100644 --- a/tests/dummy/src/index.ts +++ b/tests/dummy/src/index.ts @@ -1,5 +1,4 @@ import * as Koa from "koa"; - import { Application, jsonApiKoa, KnexProcessor } from "./jsonapi-ts"; import User from "./resources/user/resource";