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

td.replace() property replacement warning & failure states #92

Closed
3 tasks done
searls opened this issue Mar 30, 2016 · 2 comments
Closed
3 tasks done

td.replace() property replacement warning & failure states #92

searls opened this issue Mar 30, 2016 · 2 comments

Comments

@searls
Copy link
Member

searls commented Mar 30, 2016

Inspired by #86, just thinking out loud:

Property replacement should fail if:

  • The property does not exist and no manual replacement is passed
  • The property exists, no manual replacement is passed, and imitate doesn't know how to handle its type (currently imitate will return a td.function even if the property is something strange like a String, Number, null, etc.

Property replacement should warn if:

  • The property exists, manual replacement is used, and the type of the replacement doesn't match the type of replacement being passed

Is the added failure state a "breaking" change worthy of a major bump?

@searls searls added this to the console.warn heuristics milestone Mar 30, 2016
@jasonkarns
Copy link
Member

Is the added failure state a "breaking" change worthy of a major bump?

I don't think so. Present behavior isn't a "supported" use case of replace so I would consider this a new feature, if anything.

searls added a commit that referenced this issue Mar 30, 2016
TODO: this method is now super long/ugly.

See #92
@searls
Copy link
Member Author

searls commented Apr 3, 2016

Landed in 1.3.0

@searls searls closed this as completed Apr 3, 2016
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

No branches or pull requests

2 participants