AAO-React-Native icon indicating copy to clipboard operation
AAO-React-Native copied to clipboard

Fix some Redux issues

Open rye opened this issue 3 years ago • 2 comments

rye avatar Apr 16 '22 16:04 rye

--- tsc-errors.master	2022-04-16 11:06:26.863539198 -0500
+++ tsc-errors.redux-untangle	2022-04-16 12:26:03.364638796 -0500
@@ -100,18 +100,8 @@
 source/navigation/track.ts(12,30): error TS2345: Argument of type 'NavigationRoute<ParamListBase, string>' is not assignable to parameter of type 'Readonly<{ key: string; index: number; routeNames: string[]; history?: unknown[] | undefined; routes: NavigationRoute<ParamListBase, string>[]; type: string; stale: false; }>'.
   Type 'NavigationRoute<ParamListBase, string>' is missing the following properties from type 'Readonly<{ key: string; index: number; routeNames: string[]; history?: unknown[] | undefined; routes: NavigationRoute<ParamListBase, string>[]; type: string; stale: false; }>': index, routeNames, routes, type, stale
 source/navigation/track.ts(14,15): error TS2339: Property 'routeName' does not exist on type 'NavigationRoute<ParamListBase, string>'.
-source/redux/init.ts(27,36): error TS2345: Argument of type 'ThunkAction<GetEnabledToolsAction>' is not assignable to parameter of type 'AnyAction'.
-  Property 'type' is missing in type 'ThunkAction<GetEnabledToolsAction>' but required in type 'AnyAction'.
-source/redux/parts/help.ts(61,22): error TS2322: Type '{ fetching: boolean; tools: never[]; lastFetchError: null; }' is not assignable to type 'State'.
-  Types of property 'lastFetchError' are incompatible.
-    Type 'null' is not assignable to type 'boolean | undefined'.
-source/redux/parts/login.ts(122,23): error TS2322: Type '{ status: string; }' is not assignable to type 'State'.
-  Types of property 'status' are incompatible.
-    Type 'string' is not assignable to type 'LoginStateEnum'.
-source/redux/parts/settings.ts(46,26): error TS2322: Type '{ theme: string; dietaryPreferences: never[]; unofficiallyAcknowledged: boolean; }' is not assignable to type 'State'.
-  Types of property 'dietaryPreferences' are incompatible.
-    Type 'never[]' is not assignable to type '[]'.
-      Target allows only 0 element(s) but source may have more.
+source/redux/init.ts(27,36): error TS2345: Argument of type 'ThunkAction<void, ReduxState, void, GetEnabledToolsAction>' is not assignable to parameter of type 'AnyAction'.
+  Property 'type' is missing in type 'ThunkAction<void, ReduxState, void, GetEnabledToolsAction>' but required in type 'AnyAction'.
 source/views/building-hours/detail/index.tsx(19,19): error TS2339: Property 'route' does not exist on type 'Props'.
 source/views/building-hours/detail/schedule-row-android.tsx(37,22): error TS7031: Binding element 'children' implicitly has an 'any' type.
 source/views/building-hours/detail/schedule-row-android.tsx(37,32): error TS7031: Binding element 'style' implicitly has an 'any' type.
@@ -349,13 +339,6 @@
   Overload 2 of 2, '(props: IconProps, context: any): Icon', gave the following error.
     Type 'string | undefined' is not assignable to type 'string'.
       Type 'undefined' is not assignable to type 'string'.
-source/views/stoprint/print-jobs.tsx(232,3): error TS2769: No overload matches this call.
-  Overload 2 of 2, '(props: Props, context: any): PrintJobsView', gave the following error.
-    Type 'string | null' is not assignable to type 'string | undefined'.
-  Overload 2 of 2, '(props: Props, context: any): PrintJobsView', gave the following error.
-    Type '(username: any, password: any) => ThunkAction<LogInActions>' is not assignable to type '(username: string, password: string) => Promise<any>'.
-  Overload 2 of 2, '(props: Props, context: any): PrintJobsView', gave the following error.
-    Type '() => ThunkAction<UpdatePrintJobsAction>' is not assignable to type '() => Promise<any>'.
 source/views/stoprint/print-release.tsx(87,2): error TS2416: Property 'state' in type 'PrintJobReleaseView' is not assignable to the same property in base type 'PureComponent<Props, State, any>'.
   Type '{ heldJob: null; status: string; }' is not assignable to type 'Readonly<State>'.
     Types of property 'heldJob' are incompatible.

rye avatar Apr 16 '22 16:04 rye

Codecov Report

Merging #5918 (f2c995a) into master (427b922) will decrease coverage by 0.01%. The diff coverage is 0.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #5918      +/-   ##
=========================================
- Coverage    8.14%   8.13%   -0.02%     
=========================================
  Files         289     289              
  Lines        5378    5386       +8     
  Branches     1386    1391       +5     
=========================================
  Hits          438     438              
- Misses       4940    4948       +8     

codecov[bot] avatar Nov 12 '22 12:11 codecov[bot]