Skip to content

Conversation

@VipulSha99
Copy link
Owner

No description provided.

Copy link

@vineet-suri vineet-suri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to add comments to the functions wherever applicable

}

export class User<T extends Array<object>,U extends Array<Array<string>>> implements UserAction{
APIData:Array<object> = [];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user camel case for variables

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all variables are changed into camel case

let val = descriptor.value
descriptor.value = function(... args:any[]){
let arr:Array<string> = [];
for(let j=0;j<7;j++){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try to use descriptive constants instead of numbers. That makes code more readable.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed the numbers into more readable format

Comment on lines 10 to 12
addUser(refer:any):void,
selectedRowEdit(refer:any):void,
selectedRowDelete(i:any):void

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why using any type?
we should define proper types as far as possible.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed the any type with proper type

}
let cell = row.insertCell(-1)
let inputField = document.createElement('input') as HTMLInputElement;
if(column==="Phone Number"){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use enum for column names

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this reduce bugs due to typos

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed the column name into enum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants