You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JupyterContextType contains an injectableStore entry, which is the redux store for the jupyter-react. The type of injectableStore is currently any, which bypasses static type checking and triggers errors when linted with tslint:
@typescript-eslint/no-unsafe-assignment: If you use object destructuring on the useJupyter hook to access injectableStore
@typescript-eslint/no-unsafe-member-access: If you try to call injectableStore.dispatch()
@typescript-eslint/no-unsafe-call: If you try to call injectableStore.dispatch()
Proposed Solution
Add a type to the injectableStore. In Store.ts, could we have
exporttypeAppStore=typeofinjectableStore;
?
The text was updated successfully, but these errors were encountered:
To avoid users of this library to have to import a lot of jupyterlab packages while initialising the Redux store, a injectable store has been implemented to allow to lazy construct that Redux store. If we type injectableStore, the initial bundle will have to pull a lot of jupyterlab packages, which will weight a lot in the initial application loading.
We can think on how to tackle that to give a better experience, so let's leave this issue open for further discussion.
Problem
The
JupyterContextType
contains aninjectableStore
entry, which is the redux store for thejupyter-react
. The type ofinjectableStore
is currentlyany
, which bypasses static type checking and triggers errors when linted with tslint:@typescript-eslint/no-unsafe-assignment
: If you use object destructuring on theuseJupyter
hook to accessinjectableStore
@typescript-eslint/no-unsafe-member-access
: If you try to callinjectableStore.dispatch()
@typescript-eslint/no-unsafe-call
: If you try to callinjectableStore.dispatch()
Proposed Solution
injectableStore
. InStore.ts
, could we have?
The text was updated successfully, but these errors were encountered: