In my angular application i have this code
getLocalStreams: () => {
[key: Stream['key']]: Stream;
};
getting this error on compilation
An index signature parameter type cannot be a type alias. Consider writing '[key: string]: { readonly id: string; readonly key: string;
> readonly participantId: string; readonly origin: "local" | "remote";
> readonly isAudioEnabled: boolean; readonly isVideoEnabled: boolean;
> ... 4 more ...; readonly isConfigured: boolean; }' instead
any solution to fix this issue, Thanks
>Solution :
Do you mean to write this? We indicate the key will be of type string and the value of type Stream
getLocalStreams: () => {
[key: string]: Stream;
};