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

Typescript: Parcel config not compatible with system.import #208

Open
geedmo opened this issue Mar 25, 2024 · 0 comments
Open

Typescript: Parcel config not compatible with system.import #208

geedmo opened this issue Mar 25, 2024 · 0 comments

Comments

@geedmo
Copy link

geedmo commented Mar 25, 2024

Parcel component config prop seems to be not assignable with the result of system.import.
I'm updating to the latest versions provided by create-single-spa and suddenly found this error.
I'm not sure it's a bug, I haven't been able to find enough documentation for this particular case.

TS2769: No overload matches this call.
  Overload 1 of 2, '(props: ParcelCompProps<CustomProps> | Readonly<ParcelCompProps<CustomProps>>): Parcel<CustomProps>', gave the following error.
    Type '() => Promise<System.Module>' is not assignable to type 'ParcelConfig<CustomProps>'.
      Type '() => Promise<System.Module>' is not assignable to type '() => Promise<ParcelConfigObject<CustomProps>>'.
        Type 'Promise<Module>' is not assignable to type 'Promise<ParcelConfigObject<CustomProps>>'.
          Type 'Module' is not assignable to type 'ParcelConfigObject<CustomProps>'.
            Type 'Module' is missing the following properties from type 'LifeCycles<CustomProps>': bootstrap, mount, unmount
  Overload 2 of 2, '(props: ParcelCompProps<CustomProps>, context: any): Parcel<CustomProps>', gave the following error.
    Type '() => Promise<System.Module>' is not assignable to type 'ParcelConfig<CustomProps>'.
    17 |                 <Parcel
    18 |                     mountParcel={context ? context.mountParcel : null}
  > 19 |                     config={() => System.import(props.mfeName)}
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