Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No type that describes the single-spa object that is passed to micro-frontends #1158

Open
webJose opened this issue Oct 22, 2023 · 1 comment

Comments

@webJose
Copy link

webJose commented Oct 22, 2023

Describe the bug or question
When working with TypeScript projects, I am currently unable to properly type the singleSpa prop because the single-spa package has no type for this object.

To Reproduce

  1. Create a new Vite + Svelte + TS project.
  2. Install single-spa using npm i -D single-spa.
  3. Open App.svelte.
  4. Declare the singleSpa property: export let singleSpa: //What does one put here? ;. Were you able to type it?

Expected behavior

I would like to be able to comfortably type the singleSpa prop using a type from the single-spa package. Something like:

<script lang="ts">
    import { type SingleSpaLib } from 'single-spa';

    export let singleSpa: SingleSpaLib;
    ...
</script>

Screenshots and/or console output

List of everything you get when you import all of single-spa:

Part 1
Part 2

Additional context

Nothing more to add for now, but ask and I'll try to answer.

@webJose
Copy link
Author

webJose commented Oct 22, 2023

The same problem appears to exist when trying to type the mountParcel prop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant