Q:

RxJs 'from' is returning Observable of type unknown

import { Tenant } from './tenant';

import { from, Observable } from 'rxjs';

export const testTenants: Tenant[] = [
    {
        'tenant_id': 'ID1'
    }
]

const tenants$: Observable<Tenant>= from(testTenants);

I am getting the error: 
Type 'Observable<unknown>' is not assignable to type 'Observable<Tenant>'

Typescript thinks the from function is returning Observable<unknown>. How do I get it to recognise it as a Observable<Tenant>?

A:

You should use of instead of from
const tenants$: Observable<Tenant[]>= of(testTenants);

