Skip to content
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.

@deprecated flag #4

Open
dygufa opened this issue Feb 16, 2018 · 3 comments
Open

@deprecated flag #4

dygufa opened this issue Feb 16, 2018 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@dygufa
Copy link
Contributor

dygufa commented Feb 16, 2018

Problem: the need to mark methods as deprecated in order to enforce warning on the clients.

Implementation:

@deprecated($message)
get plansWithPrice()

get fullPlans()

If message is set the client will show it otherwise the message will be: "The method getPlansWithPrice is deprecated"

@lbguilherme
Copy link
Member

Should it be possible to deprecate a field? Or an optional argument?

@vhfmag
Copy link
Contributor

vhfmag commented Feb 17, 2018

It seems reasonable, but how the deprecation would be communicated to the targets?

Maybe the deprecation could be informed via documentation, but while JSDoc offers support for documenting function parameters, I don't think it supports object fields. Another option would be to deliver class instances instead of plain JS objects, so that the getter of deprecated fields could warn the developer about it, when not on production mode.

I think Swift and JVM support should be easier.

@dygufa
Copy link
Contributor Author

dygufa commented Feb 20, 2018

I agree that we should have the deprecated flag for fields as well. It could be implemented on the web by using getters and setters.

@dygufa dygufa added this to the 0.1.0 milestone Apr 2, 2018
@dygufa dygufa added the enhancement New feature or request label Apr 2, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants