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

Cannot use dts-bundle-generator with single-spa #1215

Closed
thefat32 opened this issue Apr 14, 2024 · 1 comment
Closed

Cannot use dts-bundle-generator with single-spa #1215

thefat32 opened this issue Apr 14, 2024 · 1 comment

Comments

@thefat32
Copy link

thefat32 commented Apr 14, 2024

Describe the bug or question
Cannot use dts-bundle-generator with single-spa

To Reproduce
Repro repo:

https://github.com/thefat32/dts-bundle-generator-single-spa-bug

Expected behavior
Dont' cause an error

Screenshots and/or console output
image

Additional context
See dts-bundle-generator issue for more info:
timocov/dts-bundle-generator#315

Solution

Change typings/single-spa.d.ts

Before:

  export const {
    NOT_LOADED = "NOT_LOADED",
    LOADING_SOURCE_CODE = "LOADING_SOURCE_CODE",
    NOT_BOOTSTRAPPED = "NOT_BOOTSTRAPPED",
    BOOTSTRAPPING = "BOOTSTRAPPING",
    NOT_MOUNTED = "NOT_MOUNTED",
    MOUNTING = "MOUNTING",
    MOUNTED = "MOUNTED",
    UPDATING = "UPDATING",
    UNMOUNTING = "UNMOUNTING",
    UNLOADING = "UNLOADING",
    SKIP_BECAUSE_BROKEN = "SKIP_BECAUSE_BROKEN",
    LOAD_ERROR = "LOAD_ERROR",
  };

After:

export const NOT_LOADED = "NOT_LOADED";
export const LOADING_SOURCE_CODE = "LOADING_SOURCE_CODE";
export const NOT_BOOTSTRAPPED = "NOT_BOOTSTRAPPED";
export const BOOTSTRAPPING = "BOOTSTRAPPING";
export const NOT_MOUNTED = "NOT_MOUNTED";
export const MOUNTING = "MOUNTING";
export const MOUNTED = "MOUNTED";
export const UPDATING = "UPDATING";
export const UNMOUNTING = "UNMOUNTING";
export const UNLOADING = "UNLOADING";
export const LOAD_ERROR = "LOAD_ERROR";
export const SKIP_BECAUSE_BROKEN = "SKIP_BECAUSE_BROKEN";
@MilanKovacic
Copy link
Collaborator

I can see that issue has been fixed from the dts-bundle-generator side. Currently, single-spa is being rewritten into typescript, so the definitions won't be handcrafted anymore.

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

2 participants