diff --git a/packages/core-app-api/api-report.md b/packages/core-app-api/api-report.md index 1b9e66cd39..e5135955dd 100644 --- a/packages/core-app-api/api-report.md +++ b/packages/core-app-api/api-report.md @@ -212,6 +212,10 @@ export type AppOptions = { bindRoutes?(context: { bind: AppRouteBinder }): void; }; +// Warning: (ae-forgotten-export) The symbol "PartialKeys" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "TargetRouteMap" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "KeysWithType" needs to be exported by the entry point index.d.ts +// // @public export type AppRouteBinder = < ExternalRoutes extends { @@ -453,16 +457,6 @@ export class GoogleAuth { }: OAuthApiCreateOptions): typeof googleAuthApiRef.T; } -// @public -export type KeysWithType< - Obj extends { - [key in string]: any; - }, - Type, -> = { - [key in keyof Obj]: Obj[key] extends Type ? key : never; -}[keyof Obj]; - // @public export class LocalStorageFeatureFlags implements FeatureFlagsApi { // (undocumented) @@ -601,14 +595,6 @@ export type OneLoginAuthCreateOptions = { }; }; -// @public -export type PartialKeys< - Map extends { - [name in string]: any; - }, - Keys extends keyof Map, -> = Partial> & Required>; - // @public export class SamlAuth implements ProfileInfoApi, BackstageIdentityApi, SessionApi @@ -655,20 +641,6 @@ export type SignInResult = { signOut?: () => Promise; }; -// @public -export type TargetRouteMap< - ExternalRoutes extends { - [name: string]: ExternalRouteRef; - }, -> = { - [name in keyof ExternalRoutes]: ExternalRoutes[name] extends ExternalRouteRef< - infer Params, - any - > - ? RouteRef | SubRouteRef - : never; -}; - // @public export class UnhandledErrorForwarder { static forward(errorApi: ErrorApi, errorContext: ErrorApiErrorContext): void; diff --git a/packages/core-app-api/src/app/types.ts b/packages/core-app-api/src/app/types.ts index 39f7eb3b1b..f2d1976f87 100644 --- a/packages/core-app-api/src/app/types.ts +++ b/packages/core-app-api/src/app/types.ts @@ -152,26 +152,23 @@ export type AppConfigLoader = () => Promise; /** * Extracts a union of the keys in a map whose value extends the given type - * @public */ -export type KeysWithType = { +type KeysWithType = { [key in keyof Obj]: Obj[key] extends Type ? key : never; }[keyof Obj]; /** * Takes a map Map required values and makes all keys matching Keys optional - * @public */ -export type PartialKeys< +type PartialKeys< Map extends { [name in string]: any }, Keys extends keyof Map, > = Partial> & Required>; /** * Creates a map of target routes with matching parameters based on a map of external routes. - * @public */ -export type TargetRouteMap< +type TargetRouteMap< ExternalRoutes extends { [name: string]: ExternalRouteRef }, > = { [name in keyof ExternalRoutes]: ExternalRoutes[name] extends ExternalRouteRef<