Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX stable] remove nonsense deprecation functions #20284

Merged
merged 1 commit into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions type-tests/preview/@ember/application-test/deprecations.ts

This file was deleted.

2 changes: 2 additions & 0 deletions type-tests/preview/ember/ember-module-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Ember.debug('some info for developers');
Ember.deprecate("you shouldn't use this anymore", 3 === 3, {
id: 'no-longer-allowed',
until: '99.0.0',
for: 'Ember',
since: { available: '4.0.0', enabled: '4.1.1' },
});
// get
expectTypeOf(Ember.get({ z: 23 }, 'z')).toEqualTypeOf<number>();
Expand Down
14 changes: 0 additions & 14 deletions type-tests/preview/ember/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,6 @@ function testOnError() {
};
}

function testDeprecateFunc() {
function newMethod(first: string, second: number): string {
return '';
}

const oldMethod = Ember.deprecateFunc(
'Please use the new method',
{ id: 'deprecated.id', until: '6.0' },
newMethod
);
expectTypeOf(newMethod('first', 123)).toEqualTypeOf<string>();
expectTypeOf(oldMethod('first', 123)).toEqualTypeOf<string>();
}

function testDefineProperty() {
type Contact = { firstName?: string; lastName?: string };
const contact: Contact = {};
Expand Down
24 changes: 0 additions & 24 deletions types/preview/@ember/application/deprecations.d.ts

This file was deleted.

12 changes: 6 additions & 6 deletions types/preview/ember/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ declare module 'ember' {
import EmberCoreObject from '@ember/object/core';
import * as EmberApplicationNs from '@ember/application';
import * as EmberApplicationInstanceNs from '@ember/application/instance';
import type * as EmberApplicationDeprecateNs from '@ember/application/deprecations';
import type * as EmberTestNs from '@ember/test';
import * as EmberControllerNs from '@ember/controller';
import EmberMixin from '@ember/object/mixin';
Expand Down Expand Up @@ -84,8 +83,7 @@ declare module 'ember' {
export class HashLocation extends EmberRoutingHashLocation {}
export class NoneLocation extends EmberRoutingNoneLocation {}
export class HistoryLocation extends EmberRoutingHistoryLocation {}
export const deprecateFunc: typeof EmberApplicationDeprecateNs.deprecateFunc;
export const deprecate: typeof EmberApplicationDeprecateNs.deprecate;
export const deprecate: typeof EmberDebugNs.deprecate;
export const getOwner: typeof EmberApplicationNs.getOwner;
export const setOwner: typeof EmberApplicationNs.setOwner;
export class EventDispatcher extends EmberEventDispatcher {}
Expand Down Expand Up @@ -238,9 +236,11 @@ declare module 'ember' {
const service: typeof EmberServiceNs.inject;
}
namespace ENV {
const EXTEND_PROTOTYPES: boolean | {
Array: boolean;
};
const EXTEND_PROTOTYPES:
| boolean
| {
Array: boolean;
};
const LOG_BINDINGS: boolean;
const LOG_STACKTRACE_ON_DEPRECATION: boolean;
const LOG_VERSION: boolean;
Expand Down
1 change: 0 additions & 1 deletion types/preview/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import './ember/-private/type-utils';
import './@ember/application';
import './@ember/application/-private/event-dispatcher';
import './@ember/application/-private/registry';
import './@ember/application/deprecations';
import './@ember/application/instance';
import './@ember/application/types';

Expand Down