From 721498ceb6cae5450f6da50f2cebf9a191ccaf37 Mon Sep 17 00:00:00 2001 From: Chris Krycho Date: Wed, 31 Aug 2022 21:20:36 -0600 Subject: [PATCH] Types preview: remove private DT route types We continue to maintain support for these import locations in the types on DefinitelyTyped, but remove them here so that users trying the preview types do not accidentally depend on them. --- .../preview/@ember/routing-test/route.ts | 25 +------------------ .../-private/route-info-with-attributes.d.ts | 3 --- .../@ember/routing/-private/route-info.d.ts | 3 --- .../@ember/routing/-private/transition.d.ts | 3 --- 4 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 types/preview/@ember/routing/-private/route-info-with-attributes.d.ts delete mode 100644 types/preview/@ember/routing/-private/route-info.d.ts delete mode 100644 types/preview/@ember/routing/-private/transition.d.ts diff --git a/type-tests/preview/@ember/routing-test/route.ts b/type-tests/preview/@ember/routing-test/route.ts index b550e7180f6..2ce642ec79d 100755 --- a/type-tests/preview/@ember/routing-test/route.ts +++ b/type-tests/preview/@ember/routing-test/route.ts @@ -5,8 +5,7 @@ import type Array from '@ember/array'; import EmberObject from '@ember/object'; import Controller from '@ember/controller'; import type Transition from '@ember/routing/transition'; -import type { RouteInfoWithAttributes } from '@ember/routing/route-info'; -import type RouteInfo from '@ember/routing/route-info'; +import { expectTypeOf } from 'expect-type'; class Post extends EmberObject {} @@ -207,25 +206,3 @@ class WithImplicitParams extends Route { type ImplicitParams = WithImplicitParams extends Route ? T : never; expectTypeOf().toEqualTypeOf(); - -// back-compat for existing users of these -// NOTE: we will *not* migrate the private import locations when moving to -// publish from Ember itself. -import type PrivateTransition from '@ember/routing/-private/transition'; -declare let publicTransition: Transition; -declare let oldPrivateTransition: PrivateTransition; -publicTransition = oldPrivateTransition; -oldPrivateTransition = publicTransition; - -import type PrivateRouteInfo from '@ember/routing/-private/route-info'; -declare let publicRouteInfo: RouteInfo; -declare let privateRouteInfo: PrivateRouteInfo; -publicRouteInfo = privateRouteInfo; -privateRouteInfo = publicRouteInfo; - -import type PrivateRouteInfoWithAttributes from '@ember/routing/-private/route-info-with-attributes'; -import { expectTypeOf } from 'expect-type'; -declare let publicRouteInfoWithAttributes: RouteInfoWithAttributes; -declare let privateRouteInfoWithAttributes: PrivateRouteInfoWithAttributes; -publicRouteInfoWithAttributes = privateRouteInfoWithAttributes; -privateRouteInfoWithAttributes = publicRouteInfoWithAttributes; diff --git a/types/preview/@ember/routing/-private/route-info-with-attributes.d.ts b/types/preview/@ember/routing/-private/route-info-with-attributes.d.ts deleted file mode 100644 index eccb9e34b6b..00000000000 --- a/types/preview/@ember/routing/-private/route-info-with-attributes.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module '@ember/routing/-private/route-info-with-attributes' { - export { RouteInfoWithAttributes as default } from '@ember/routing/route-info'; -} diff --git a/types/preview/@ember/routing/-private/route-info.d.ts b/types/preview/@ember/routing/-private/route-info.d.ts deleted file mode 100644 index 6174f5896a8..00000000000 --- a/types/preview/@ember/routing/-private/route-info.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module '@ember/routing/-private/route-info' { - export { default as default } from '@ember/routing/route-info'; -} diff --git a/types/preview/@ember/routing/-private/transition.d.ts b/types/preview/@ember/routing/-private/transition.d.ts deleted file mode 100644 index bfaa3add03f..00000000000 --- a/types/preview/@ember/routing/-private/transition.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module '@ember/routing/-private/transition' { - export { default as default } from '@ember/routing/transition'; -}