Skip to content

Docs issue: js-data-http #80

@BovineEnthusiast

Description

@BovineEnthusiast

http://www.js-data.io/v3.0/docs/js-data-http

The code does not compile on TS version 3.1.6:

import { DataStore } from 'js-data';
import { HttpAdapter, addAction } from 'js-data-http';

const store = new DataStore();
const httpAdapter = new HttpAdapter();

store.registerAdapter('http', httpAdapter, { 'default': true });

// Setup action: GET /reports/schools/:school_id/teachers
@addAction('getTeacherReports', {
  pathname: 'teachers',
  method: 'GET'
}); // <---- Error: Declaration expected
store.defineMapper('school', {
  endpoint: 'schools'
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions