Skip to content

Commit

Permalink
Merge pull request #2824 from marmelab/crud-actions-typescript
Browse files Browse the repository at this point in the history
[RFR] Migrate remaining actions and side effects to Typescript
  • Loading branch information
Gildas Garcia authored Jan 29, 2019
2 parents d79410c + f685dbc commit 03edf77
Show file tree
Hide file tree
Showing 30 changed files with 1,206 additions and 396 deletions.
1 change: 1 addition & 0 deletions examples/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"hard-source-webpack-plugin": "^0.11.2",
"html-loader": "~0.5.5",
"html-webpack-plugin": "~3.2.0",
"ignore-not-found-export-plugin": "^1.0.1",
"jest": "^23.6.0",
"ra-data-fakerest": "^2.0.0",
"ra-input-rich-text": "^2.0.0",
Expand Down
8 changes: 8 additions & 0 deletions examples/simple/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
const IgnoreNotFoundExportPlugin = require('ignore-not-found-export-plugin');

module.exports = {
devtool: 'cheap-module-source-map',
Expand All @@ -23,6 +24,13 @@ module.exports = {
template: './src/index.html',
}),
new HardSourceWebpackPlugin(),
// required because of https://github.com/babel/babel/issues/7640
new IgnoreNotFoundExportPlugin([
'CallbackSideEffect',
'NotificationSideEffect',
'RedirectionSideEffect',
'RefreshSideEffect',
]),
],
resolve: {
extensions: ['.ts', '.js', '.tsx', '.json'],
Expand Down
4 changes: 2 additions & 2 deletions packages/ra-core/src/actions/accumulateActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export interface CrudGetMatchingAccumulateAction {
export const crudGetMatchingAccumulate = (
reference: string,
relatedTo: string,
pagination: object,
sort: object,
pagination: { page: number; perPage: number },
sort: { field: string; order: string },
filter: object
): CrudGetMatchingAccumulateAction => {
const action = crudGetMatching(
Expand Down
342 changes: 0 additions & 342 deletions packages/ra-core/src/actions/dataActions.js

This file was deleted.

Loading

0 comments on commit 03edf77

Please sign in to comment.