Skip to content

Commit

Permalink
Merge pull request #289 from ember-a11y/fix-deprecate
Browse files Browse the repository at this point in the history
  • Loading branch information
scalvert committed Aug 6, 2021
2 parents 3e36d5f + a5aafc9 commit 9270f04
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
4 changes: 4 additions & 0 deletions addon-test-support/audit-if.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export default function a11yAuditIf(
{
id: 'ember-a11y-testing-deprecated-a11y-audit-if',
until: '5.0.0',
for: 'ember-a11y-testing',
since: {
enabled: '4.0.0',
},
}
);

Expand Down
35 changes: 35 additions & 0 deletions types/ember-debug.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import '@ember/debug';

export type DeprecationStages = 'available' | 'enabled';

declare module '@ember/debug' {
export function deprecate(
message: string,
test: boolean,
options: {
/**
* A unique id for this deprecation. The id can be used by Ember debugging
* tools to change the behavior (raise, log or silence) for that specific
* deprecation. The id should be namespaced by dots, e.g.
* `"view.helper.select"`.
*/
id: string;
/**
* The version of Ember when this deprecation warning will be removed.
*/
until: string;
/**
* A namespace for the deprecation, usually the package name
*/
for: string;
/**
* Describes when the deprecation became available and enabled
*/
since: Partial<Record<DeprecationStages, string>>;
/**
* An optional url to the transition guide on the emberjs.com website.
*/
url?: string | undefined;
}
): void;
}

0 comments on commit 9270f04

Please sign in to comment.