Unexport internal utility types

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2021-11-16 14:36:13 +01:00
parent 0da0143e85
commit 10a5e819dd
2 changed files with 7 additions and 38 deletions
+4 -32
View File
@@ -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<Pick<Map, Keys>> & Required<Omit<Map, Keys>>;
// @public
export class SamlAuth
implements ProfileInfoApi, BackstageIdentityApi, SessionApi
@@ -655,20 +641,6 @@ export type SignInResult = {
signOut?: () => Promise<void>;
};
// @public
export type TargetRouteMap<
ExternalRoutes extends {
[name: string]: ExternalRouteRef;
},
> = {
[name in keyof ExternalRoutes]: ExternalRoutes[name] extends ExternalRouteRef<
infer Params,
any
>
? RouteRef<Params> | SubRouteRef<Params>
: never;
};
// @public
export class UnhandledErrorForwarder {
static forward(errorApi: ErrorApi, errorContext: ErrorApiErrorContext): void;
+3 -6
View File
@@ -152,26 +152,23 @@ export type AppConfigLoader = () => Promise<AppConfig[]>;
/**
* Extracts a union of the keys in a map whose value extends the given type
* @public
*/
export type KeysWithType<Obj extends { [key in string]: any }, Type> = {
type KeysWithType<Obj extends { [key in string]: any }, Type> = {
[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<Pick<Map, Keys>> & Required<Omit<Map, Keys>>;
/**
* 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<