Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assignment 4 #10

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

assignment 4 #10

wants to merge 4 commits into from

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