When starting the playground app the following error is generated:
Failed to compile.
./src/features/counters/actions.ts
Line 18:1: Import in body of module; reorder to top import/first
Line 19:1: Import in body of module; reorder to top import/first
Search for the keywords to learn more about each error.
Steps to Reproduce
npm i then npm start in the playground/ directory
Expected behavior
App starts
Suggested solution(s)
Change the import order
diff --git a/playground/src/features/counters/actions.ts b/playground/src/features/counters/actions.ts
index 5833707..05c6fb4 100644
--- a/playground/src/features/counters/actions.ts
+++ b/playground/src/features/counters/actions.ts
@@ -2,6 +2,9 @@ import { action } from 'typesafe-actions';
import { ADD, INCREMENT } from './constants';
+import { createAction } from 'typesafe-actions';
+import { Todo } from '../todos/models';
+
/* SIMPLE API */
export const increment = () => action(INCREMENT);
@@ -15,9 +18,6 @@ export const add = (amount: number) => action(ADD, amount);
// This will allow to completely eliminate need for "constants" in your application, more info here:
// https://github.com/piotrwitek/typesafe-actions#constants
-import { createAction } from 'typesafe-actions';
-import { Todo } from '../todos/models';
-
export const emptyAction = createAction(INCREMENT)<void>();
export const payloadAction = createAction(ADD)<number>();
export const payloadMetaAction = createAction(ADD)<number, string>();
(END)
Description
When starting the playground app the following error is generated:
Steps to Reproduce
npm i
thennpm start
in theplayground/
directoryExpected behavior
App starts
Suggested solution(s)
Change the import order