I am working on angular 2 application using ag-grid plugin and gulp as build tool -
#225 function onPageSizeChanged(pageSize) {
#226 this.pageSize = new Number(pageSize);
createNewDatasource();
}
I am getting below error message for above code -
[gulp-tslint] error app/app.component.ts[226, 21]: Forbidden constructor, use a literal or simple function call instead
Please let me know if this information is not sufficient, I will provide further details. Thanks in advance.
Just
this.pageSize = pageSize;
What's the intention of using new Number(pageSize); anyway?
See also https://github.com/palantir/tslint/blob/master/src/rules/noConstructRule.ts#L26
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With