mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Add url property to deprecation options in ember/application/deprecations
This commit is contained in:
+9
-2
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user