mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Add url property to deprecation options
See 56d60eac53/packages/%40ember/debug/lib/deprecate.ts (L16)
This commit is contained in:
parent
112076b653
commit
e065fec390
16
types/ember/v2/index.d.ts
vendored
16
types/ember/v2/index.d.ts
vendored
@ -274,6 +274,12 @@ declare module 'ember' {
|
||||
triggerAction(opts: TriggerActionOptions): boolean;
|
||||
}
|
||||
|
||||
interface DeprecationOptions {
|
||||
id: string;
|
||||
until: string;
|
||||
url?: string;
|
||||
}
|
||||
|
||||
export namespace Ember {
|
||||
interface FunctionPrototypeExtensions {
|
||||
/**
|
||||
@ -2574,14 +2580,14 @@ declare module 'ember' {
|
||||
*/
|
||||
deprecatingAlias(
|
||||
dependentKey: string,
|
||||
options: { id: string; until: string }
|
||||
options: DeprecationOptions
|
||||
): ComputedProperty<any>;
|
||||
/**
|
||||
* @deprecated Missing deprecation options: https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options
|
||||
*/
|
||||
deprecatingAlias(
|
||||
dependentKey: string,
|
||||
options?: { id?: string; until?: string }
|
||||
options?: Partial<DeprecationOptions>
|
||||
): ComputedProperty<any>;
|
||||
/**
|
||||
* A computed property that returns the sum of the values
|
||||
@ -2977,7 +2983,7 @@ declare module 'ember' {
|
||||
function deprecate(
|
||||
message: string,
|
||||
test: boolean,
|
||||
options: { id: string; until: string }
|
||||
options: DeprecationOptions
|
||||
): any;
|
||||
/**
|
||||
* @deprecated Missing deprecation options: https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options
|
||||
@ -2985,7 +2991,7 @@ declare module 'ember' {
|
||||
function deprecate(
|
||||
message: string,
|
||||
test: boolean,
|
||||
options?: { id?: string; until?: string }
|
||||
options?: Partial<DeprecationOptions>
|
||||
): any;
|
||||
/**
|
||||
* Define an assertion that will throw an exception if the condition is not met.
|
||||
@ -3012,7 +3018,7 @@ declare module 'ember' {
|
||||
*/
|
||||
function deprecateFunc<Func extends ((...args: any[]) => any)>(
|
||||
message: string,
|
||||
options: { id: string; until: string },
|
||||
options: DeprecationOptions,
|
||||
func: Func
|
||||
): Func;
|
||||
/**
|
||||
|
||||
@ -50,6 +50,14 @@ function testDeprecateFunc() {
|
||||
assertType<string>(oldMethod('first', 123));
|
||||
}
|
||||
|
||||
function testDeprecate() {
|
||||
Ember.deprecate('This has been deprecated', false, {
|
||||
id: 'some.id',
|
||||
until: '1.0.0',
|
||||
url: 'http://www.emberjs.com'
|
||||
});
|
||||
}
|
||||
|
||||
function testDefineProperty() {
|
||||
const contact = {};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user