Answer the question
In order to leave comments, you need to log in
How to write a nested type?
There is a subscription to the stream. It receives data in the following format:
{
data: [
{id: 1, score: 11},
{id: 2, score: 22},
{id: 3, score: 33},
]
}
export interface IScore {
id: number;
score: number;
}
flow$.subscribe(res: {data: IScore[]} => {
console.log(res);
});
Answer the question
In order to leave comments, you need to log in
flow$.subscribe((res: {data: IScore[]}) => {
console.log(res);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question