Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs issue: js-data-http #80

Open
BovineEnthusiast opened this issue Jan 4, 2019 · 0 comments
Open

Docs issue: js-data-http #80

BovineEnthusiast opened this issue Jan 4, 2019 · 0 comments

Comments

@BovineEnthusiast
Copy link

BovineEnthusiast commented Jan 4, 2019

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'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant