Good morning, I am new to Typescript and would like to know how I can pass my JavaScript code to Typescript, since I am rewriting my code in Angular 2.
Example:
var o = geotab.addin.addinangular= function () {
'use strict';
return {
...
In this case, geotab
is an object defined when the JavaScript file is uploaded to the GEOTAB platform, and its addin
attribute contains an initialization function called addinangular
. That is, I need to be able to define a function to the geotab.addin
object in Typescript with this structure: geotab.addin.funcion()
.