frontend-plugin-api: improve type errors for createFrontend{Plugin,Module}
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -86,7 +86,7 @@ export interface InternalFrontendModule extends FrontendModule {
|
||||
*/
|
||||
export function createFrontendModule<
|
||||
TId extends string,
|
||||
TExtensions extends readonly ExtensionDefinition[] = [],
|
||||
TExtensions extends readonly ExtensionDefinition[],
|
||||
>(options: CreateFrontendModuleOptions<TId, TExtensions>): FrontendModule {
|
||||
const { pluginId } = options;
|
||||
|
||||
|
||||
@@ -182,9 +182,9 @@ export interface PluginOptions<
|
||||
*/
|
||||
export function createFrontendPlugin<
|
||||
TId extends string,
|
||||
TExtensions extends readonly ExtensionDefinition[],
|
||||
TRoutes extends { [name in string]: RouteRef | SubRouteRef } = {},
|
||||
TExternalRoutes extends { [name in string]: ExternalRouteRef } = {},
|
||||
TExtensions extends readonly ExtensionDefinition[] = [],
|
||||
>(
|
||||
options: PluginOptions<TId, TRoutes, TExternalRoutes, TExtensions>,
|
||||
): OverridableFrontendPlugin<
|
||||
|
||||
Reference in New Issue
Block a user