TypeScript - TextBox

Here is code I used to convert a textbox that should contain a number into a string

1
2
3
4
5
var rowsShown : number = 20;
ppSize: string = ($('txtPageSize').val() as string);
if (isNumber(ppSize)) {
rowsShown = Number(ppSize);
}