import { Tenant } from './tenant';
import { from, Observable } from 'rxjs';
export const testTenants: Tenant[] = [
{
'tenant_id': 'ID1'
}
]
const tenants$: Observable<Tenant>= from(testTenants);
I encountered an issue:
Type 'Observable<unknown>' is not assignable to type 'Observable<Tenant>'
My challenge lies in Typescript mistakenly identifying the from
function as returning Observable<unknown>
. How can I make it recognize it correctly as a Observable<Tenant>
?