Is there a way with npm to get only the types of a package?

For testing, i would like to add a devDependencies of theia packages (core/editor/…) in order to get types so i’ll get code completion and more.

Is there a way with npm to get only the types and not the whole package?

What types are missing? Can you please explain? Maybe we can improve the contributor experience in general.

Hi,
No types are missing. I’m writing an api tests (in a different repo) as described [here].(https://github.com/eclipse-theia/theia/blob/master/doc/api-testing.md#accessing-application-services)
I would like to have code completion and linting when writing it.
So for example if i do:
const workspaceService = container.get(WorkspaceService);
and then:
workspaceService.something and something doesn’t exist i’ll get on demand linting error.

For that, i need to add all relevant packages to my package.json, but i don’t want the whole package, i want only the types.

It this possible anyway?

We do not publish packages containing types only. So I do not think, it’s possible.

:man_shrugging: I am still not getting what kind of problem you are trying to solve as each Theia extension comes with types, so the linting should work if you declare the types in your tests.

  • Do you want to speed up install by reducing the size?
  • Are you aware of the type-only imports?