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

[DOC] Update docs to show deprecate function within @ember/debug package #17926

Merged
merged 1 commit into from
Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/@ember/debug/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ if (DEBUG) {
});

/**
@module @ember/application
@module @ember/debug
@public
*/

Expand All @@ -226,14 +226,14 @@ if (DEBUG) {
incuring any performance penalty.

```javascript
import { deprecateFunc } from '@ember/application/deprecations';
import { deprecateFunc } from '@ember/debug';

Ember.oldMethod = deprecateFunc('Please use the new, updated method', options, Ember.newMethod);
```

@method deprecateFunc
@static
@for @ember/application/deprecations
@for @ember/debug
@param {String} message A description of the deprecation.
@param {Object} [options] The options object for `deprecate`.
@param {Function} func The new function called to replace its deprecated counterpart.
Expand Down
6 changes: 3 additions & 3 deletions packages/@ember/debug/lib/deprecate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export type DeprecateFunc = (message: string, test?: boolean, options?: Deprecat
*/
/**
Allows for runtime registration of handler functions that override the default deprecation behavior.
Deprecations are invoked by calls to [@ember/application/deprecations/deprecate](https://emberjs.com/api/ember/release/classes/@ember%2Fapplication%2Fdeprecations/methods/deprecate?anchor=deprecate).
Deprecations are invoked by calls to [@ember/debug/deprecate](https://emberjs.com/api/ember/release/classes/@ember%2Fdebug/methods/deprecate?anchor=deprecate).
The following example demonstrates its usage by registering a handler that throws an error if the
message contains the word "should", otherwise defers to the default handler.

Expand Down Expand Up @@ -155,7 +155,7 @@ if (DEBUG) {
missingOptionsIdDeprecation = 'When calling `deprecate` you must provide `id` in options.';
missingOptionsUntilDeprecation = 'When calling `deprecate` you must provide `until` in options.';
/**
@module @ember/application
@module @ember/debug
@public
*/
/**
Expand All @@ -166,7 +166,7 @@ if (DEBUG) {
Uses of this method in Ember itself are stripped from the ember.prod.js build.

@method deprecate
@for @ember/application/deprecations
@for @ember/debug
@param {String} message A description of the deprecation.
@param {Boolean} test A boolean. If falsy, the deprecation will be displayed.
@param {Object} options
Expand Down