Skip to content

assignment 4#10

Open
Tyagi-Sunny wants to merge 4 commits intodevfrom
assi4
Open

assignment 4#10
Tyagi-Sunny wants to merge 4 commits intodevfrom
assi4

Conversation

@Tyagi-Sunny
Copy link
Owner

@Tyagi-Sunny Tyagi-Sunny commented Sep 19, 2022

Assignment 4- Add the following to above exercise using TS

1 Add a role type as enum - 'SuperAdmin', 'Admin', 'Subscriber'. Use this enum as type for role attribute in User.

2 Make the user CRUD using generic.

3 Make a date time formatter decorator. Use the decorator to format date time fields.

scripts/main.ts Outdated
@@ -0,0 +1,188 @@
enum role {
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be Role

scripts/main.ts Outdated
}

@getDate(new Date())
class userDataTable<T, R> implements CRUD<T, R> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be UserDataTable

scripts/main.js Outdated
}
let userDataTable = class userDataTable {
constructor() { }
set dataSetter(_data) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

dont use setter word

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.

2 participants