I am attempting to write a JavaScript application for a use in a custom DNN v8 module using TypeScript in VS 2017.
This script will be using AJAX to call an API implemented using the DNN Services Framework. I am NOT using Angular or React, only Typescript 2.6 which I am try to get to compile as a separate Javascript ES6 file. I am a Typescript newbe.
My question is how do I import the DNN Service Framework, ,dnnModal, etc. into my Typescript?
The statement: var sf = $.ServicesFramework(mid); throws an error in Typescript. as does dnnModal.
I have not been able to find any Typescript code example for DNN.
The two errors that I have not been able to resolve which are preventing me form compiling are:
(TS) Property 'ServicesFramework' does not exist on type 'JQueryStatic<HTMLElement>'
(TS) Cannot find dnnModal
Any suggested on how to resolve these errors in Typescript would be very much appreciated.
Thanks in advance, Les