-
Notifications
You must be signed in to change notification settings - Fork 45
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
Feat (data): support checklist data format #103
Conversation
src/utils/normalizeData.ts
Outdated
*/ | ||
function instanceOfListData(data: ListData | OldListData): data is OldListData { | ||
function instanceOfListData(data: ListData | OldListData | OldChecklistData): data is OldListData { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function name means checking passed value to be ListData
(new). But it checks for the OldListData
.
src/utils/normalizeData.ts
Outdated
* Method that checks if data is related to the List or NestedListTool | ||
* @param data - data of the List or NestedListTool | ||
* @returns true if data related to the List tool, false if to Nested List tool | ||
* Method that checks if data is related to the List Tool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description is unclear
src/utils/normalizeData.ts
Outdated
return (typeof data.items[0] === 'string'); | ||
} | ||
|
||
/** | ||
* Method that checks if data is related to the Checklist tool | ||
* @param data - data of the Checklist of NestedList tool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @param data - data of the Checklist of NestedList tool | |
* @param data - data of the Checklist or NestedList tool |
Problem
Checklist data format is not supported for this tool
Solution
Improved
normalizeData()
method that now checks if data is related to the Checklist tool and converts it to Nested List data