From a5aafc98b0969a4306a695a028af98654f254cf4 Mon Sep 17 00:00:00 2001 From: Steve Calvert Date: Fri, 6 Aug 2021 13:13:38 -0700 Subject: [PATCH] fix: Fixes deprecate call to include for and since props --- addon-test-support/audit-if.ts | 4 ++++ types/ember-debug.d.ts | 35 ++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 types/ember-debug.d.ts diff --git a/addon-test-support/audit-if.ts b/addon-test-support/audit-if.ts index d8271563..c6ae53b3 100644 --- a/addon-test-support/audit-if.ts +++ b/addon-test-support/audit-if.ts @@ -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', + }, } ); diff --git a/types/ember-debug.d.ts b/types/ember-debug.d.ts new file mode 100644 index 00000000..7b5b1ec1 --- /dev/null +++ b/types/ember-debug.d.ts @@ -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>; + /** + * An optional url to the transition guide on the emberjs.com website. + */ + url?: string | undefined; + } + ): void; +}