jupyterlab-data-explorer
jupyterlab-data-explorer copied to clipboard
Error when building extension
Checklist
Please ensure the following tasks are completed before filing a bug report.
- [x] Read and understood the [Code of Conduct][code-of-conduct].
- [x] Searched for existing issues and pull requests.
Description
Description of the issue.
Hi there. I tried to install the extension by cloning the master branch. I encountered the following error when running jplm run build
:
[4/4] Building fresh packages...
$ tsc --build packages/*
packages/dataregistry-extension/src/file.ts:68:9 - error TS2322: Type 'Observable<string | object | undefined> | null' is not assignable to type 'Observable<datasetsObjectType> | { data: Observable<datasetsObjectType>; type: void; } | { data: Observable<datasetsObjectType>; type: void; }[] | null | undefined'.
Type 'Observable<string | object | undefined>' is not assignable to type 'Observable<datasetsObjectType> | { data: Observable<datasetsObjectType>; type: void; } | { data: Observable<datasetsObjectType>; type: void; }[] | null | undefined'.
Type 'Observable<string | object | undefined>' is not assignable to type 'Observable<datasetsObjectType>'.
Type 'string | object | undefined' is not assignable to type 'datasetsObjectType'.
Type 'undefined' is not assignable to type 'datasetsObjectType'.
68 type === datasetsFileMimeType
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 ? data.pipe(
~~~~~~~~~~~~~~~~~~~~~~
...
77 )
~~~~~~~~~~~~~
78 : null
~~~~~~~~~~~~~~~~
packages/dataregistry/lib/createConverter.d.ts:46:8
46 }, fn: (_: {
~~~~~
47 data: fromD;
~~~~~~~~~~~~~~~~
...
55 type: toT;
~~~~~~~~~~~~~~
56 }>): Converter<fromD, toD>;
~~
The expected type comes from the return type of this signature.
Related Issues
Does this issue have any related issues?
Related issues #138.
Questions
Any questions for reviewers?
More broadly, I would be interested to know if this extension (and the related one https://github.com/jupyterlab/jupyterlab-hdf5) is actively maintained. We are developing web visualisation tools for HDF5 files and these extensions are of great interest for us to integrate them into Jupyter.
Other
Any other information relevant to this issue? This may include screenshots, references, stack traces, sample output, and/or implementation notes.
I managed to make it work by replacing the null
in the ternary with {data: {}}
. But that might not be the intended behaviour.
Environments
What environments are affected (e.g., if unique to a particular browser,
Chrome
,IE 11
)? Include the Python package version, extension version, and any other potentially relevant platform information.
-
node
:v12.18.2
-
typescript
:3.9.3
-
jupyterlab
:2.2.4
This issue is in fact related to TS and independent of the JupyterLab version.
I change the name of the issue accordingly.
@loichuder so the fixed one support versions > 2.0 now?