I am working with a third-party angular2 plugin named .
The FileUploader typescript class is defined as:
export class FileUploader {
public url:string;
...
public queueLimit:number;
public _nextIndex = 0;
...
This generations a javsacript file with:
FileUploader = (function () {
function FileUploader(options) {
...
this._nextIndex = 0;
...
this.url = options.url;
...
Notice that the queueLimit variable does not get generated in the javascript file.
If I give queueLimit as default value then it is generated.
export class FileUploader { public url:string; ... public queueLimit:number; public _nextIndex = 0; ...
FileUploader = (function () {
function FileUploader(options) {
...
this.queueLimit = 50;
this._nextIndex = 0;
...
this.url = options.url;
...
This causes problems when using that variable in js file.