Ember.deprecateFunc()

deprecateFunc (message, options, func) Functionprivate

Defined in packages/ember-debug/lib/index.js:91

Alias an old, deprecated method with its new counterpart.

Display a deprecation warning with the provided message and a stack trace (Chrome and Firefox only) when the assigned method is called.

  • In a production build, this method is defined as an empty function (NOP).
Ember.oldMethod = Ember.deprecateFunc('Please use the new, updated method', Ember.newMethod);

Parameters:

message String
A description of the deprecation.
options [Object]
The options object for Ember.deprecate.
func Function
The new function called to replace its deprecated counterpart.

Returns:

Function
A new function that wraps the original function with a deprecation warning
doc_EmberJs
2016-11-30 16:51:23
Comments
Leave a Comment

Please login to continue.