Ш
Как можно из промиса вытащить данные?
const comments = ServiceModule.get(REQ_URL).then(comments => console.log(comments))
console.log(comments)
Можно ли в константу comments
присвоить данные из промиса?.then(comments => comments)
Size: a a a
Ш
const comments = ServiceModule.get(REQ_URL).then(comments => console.log(comments))
console.log(comments)
Можно ли в константу comments
присвоить данные из промиса?.then(comments => comments)
A
.then(comments => comments)
const comments = ServiceComments.getComments().then(comments => comments)
Всё равно тип у консты Promise<IComments>A
A
NP
NP
A
A
A
NP
NP
A
const comments = ServiceComments.getComments().then(comments => comments)
В том, что я хочу присвоить comments результат, а не промис от результата.NP
A
NP
NP
A
A