I have succesfully embedded a report using a powerbi
service:
const report = powerbi.embed(...)
Now report
is of type Embed
and not Report
as expected. Thus, no Report-specific functions are available (at least typescript-wise). What am i missing?
EDIT: The report
object is indeed an instance of the Report
class, but the type is still Embed
. Do i need to install additional typings for powerbi-client
?
Advertisement
Answer
No need to install any additional typings. Just return the powerbi.embed as Report and it will works.
const report = powerbi.embed(.....) as Report