npm -vin the command line(cmd).
tsc -vin the command line(cmd).
Note: To install TypeScript.
This will install TypeScript globally
npm install -g typescript
At the top of the main HTML (e.g. index.html) we need to add a reference to the jquery.js library. Next we need to add a reference to jqxcore.js. After that we can add the .js files for the jqxWidgets that we want to use. Finally, we need to include the app.js file that was compiled from the app.ts file. The contents of "app.ts" will be explained in detail further ahead in the article.
The index.html file must contain the following libraries in it's header in that order:
Add a reference to jqwidgets.d.ts in the app.ts file.
Next we need to create a function that will be invoked from the index.htm. A different number of arguments (selectors) can be passed to the function depending on how many widgets will be used. In the current example we need to pass only one argument, the id of the DOM element that will be used for the particular widget.
Set the options for the widget in an object of type: "jqwidgets.WidgetNameOptions":
To create an instance of the widget use jqwidgets.createInstance(selector, widgetName, options).
Note: To compile manually "app.ts" to "app.js".
You need to use this command every time you make changes in app.ts.
This command will recompile 'app.ts' every time you save the file.
tsc app.ts --out app.js --watch