Closed LiKang6688 closed 2 years ago
Hi @LiKang6688, not sure what ts definitions that are being consumed here, but shouldn't it be
const app = session.open().then(global => global.openDoc(appId));
?
Hi @wennmo, yes, my wrong spelling. It should be openDoc
.
So the type for global
is IGeneratedAPI
and the Property openDoc
is missing in IGeneratedAPI
.
@types/enigma.js https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/enigma.js is maintained by Konrad Mattheis outside of Qlik. So I close the issue.
to solve this use case (not tested)
I think you can add a dependency to @types/qlik-engineapi
(in addition to @types/enigma.js
)
and use session.open<EngineAPI.IGlobal>().then((global) => ...);
to get a useable type
@T-Wizard It works. Thanks.
Description
[Description of the issue]
Following the code snippet from https://github.com/qlik-oss/enigma.js/blob/master/docs/api.md#sessionopen
Property 'opendoc' does not exist on type 'IGeneratedAPI'
Environment
Developing a mashup in typescript
Library
Operating system
Qlik Sense
Versions