Add url property to deprecation options in ember/application/deprecations

This commit is contained in:
simonihmig
2019-03-01 12:08:26 -08:00
committed by Mike North
parent e065fec390
commit 8cfa0ed334
2 changed files with 15 additions and 3 deletions
+9 -2
View File
@@ -1,3 +1,10 @@
// tslint:disable-next-line:strict-export-declare-modifiers
interface DeprecationOptions {
id: string;
until: string;
url?: string;
}
/**
* Display a deprecation warning with the provided message and a stack trace
* (Chrome and Firefox only).
@@ -5,7 +12,7 @@
export function deprecate(
message: string,
test: boolean,
options: { id: string; until: string }
options: DeprecationOptions
): any;
/**
@@ -13,6 +20,6 @@ export function deprecate(
*/
export function deprecateFunc<Func extends ((...args: any[]) => any)>(
message: string,
options: { id: string; until: string },
options: DeprecationOptions,
func: Func
): Func;
@@ -1,8 +1,13 @@
import { deprecate, deprecateFunc } from '@ember/application/deprecations';
deprecate('this is no longer advised', false, {
id: 'no-longer-advised',
until: 'v4.0'
});
deprecate('this is no longer advised', false, {
id: 'no-longer-advised',
until: 'v4.0'
until: 'v4.0',
url: 'https://emberjs.com'
});
deprecate('this is no longer advised', false); // $ExpectError