Facing compile time issue for single spa code in angular 16, but the same code working fine in angular 7 #500
Unanswered
KeerthanaShanmugam2802
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For the below code facing the compile time issue in angular 16 but the same code working fine in angular 7. I trying to inject the external angular app inside the div.
No overload matches this call.
Overload 1 of 2, '(observerOrNext?: Partial<Observer> | ((value: unknown) => void) | undefined): Subscription', gave the following error.
Argument of type '(app: ParcelConfig) => void' is not assignable to parameter of type 'Partial<Observer> | ((value: unknown) => void) | undefined'.
Type '(app: ParcelConfig) => void' is not assignable to type '(value: unknown) => void'.
Types of parameters 'app' and 'value' are incompatible.
Type 'unknown' is not assignable to type 'ParcelConfig'.
Overload 2 of 2, '(next?: ((value: unknown) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): Subscription', gave the following
error.
Argument of type '(app: ParcelConfig) => void' is not assignable to parameter of type '(value: unknown) => void'.
Types of parameters 'app' and 'value' are incompatible.
Type 'unknown' is not assignable to type 'ParcelConfig'.
import {ChangeDetectionStrategy, Component, Inject, ElementRef, OnInit, ViewChild} from "@angular/core";
import {from} from "rxjs";
import {mountRootParcel, ParcelConfig} from 'single-spa';
import {start as singleSpaStart} from 'single-spa';
@component({
selector: 'single-spa',
template: '<div #testContainer>',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class SingleSpaComponent implements OnInit {
processContext: any;
}
Please suggest any solution for this.
Beta Was this translation helpful? Give feedback.
All reactions