Skip to content

Conversation

@anyatokar
Copy link

Implemented .clone(isDeepCopy as Boolean) for ifSGNodeDict interface. Both shallow and deep clones copy Fields but only the deep clone copies Children.

Added associated unit and e2e tests.

Copy link
Collaborator

@strattonbrazil strattonbrazil left a comment

Choose a reason for hiding this comment

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

Looks good to me. A few suggestions that might clean things up a bit.

// A deep clone also copies children.
if (isDeepCopy) {
let appendChild = copy.getMethod("appendchild");
let getChildren = toBeCloned.getMethod("getchildren");
Copy link
Collaborator

Choose a reason for hiding this comment

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

This code would be a little cleaner if we exposed getChildren in typescript. I wonder if that's worth it. Then the callable would just wrap that response in an RoArray.

Copy link
Contributor

@underwoo16 underwoo16 left a comment

Choose a reason for hiding this comment

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

I agree with @strattonbrazil suggestions, otherwise this looks great 👍🏼

Copy link
Collaborator

@alimnios72 alimnios72 left a comment

Choose a reason for hiding this comment

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

Thanks for the changes

@lvcabral
Copy link
Contributor

@anyatokar this project is stalled and the Roku Community has forked it (see @sjbarag suggestion on #681) do you mind re-pushing your PR on https://github.com/rokucommunity/brs ?

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.

5 participants