I have a class in typescript with several params, which are empty in the constructor. I would like to have a default value for one of the optional params:
export class SomeClass {
pageSize: number = 10;
constructor(pagesize?: number){
this.pageSize = pageSize;
}
}
If I instantiate the class like this:
let k = new SomeTest()
The pageSize is undefined
How could I initialize a optional property?
Thank you!