frontend-plugin-api: tsdoc review fixes
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -308,16 +308,16 @@ export type ExtensionDefinition<
|
||||
*
|
||||
* @example
|
||||
*
|
||||
*```ts
|
||||
*const myExtension = createExtension({
|
||||
* name: 'example',
|
||||
* attachTo: { id: 'app', input: 'root' },
|
||||
* output: [coreExtensionData.reactElement],
|
||||
* factory() {
|
||||
* return [coreExtensionData.reactElement(<h1>Hello, world!</h1>)];
|
||||
* },
|
||||
*});
|
||||
*```
|
||||
* ```ts
|
||||
* const myExtension = createExtension({
|
||||
* name: 'example',
|
||||
* attachTo: { id: 'app', input: 'root' },
|
||||
* output: [coreExtensionData.reactElement],
|
||||
* factory() {
|
||||
* return [coreExtensionData.reactElement(<h1>Hello, world!</h1>)];
|
||||
* },
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
|
||||
@@ -419,7 +419,7 @@ function unwrapParams<TParams extends object>(
|
||||
* blueprint, removing a lot of the boilerplate and complexity that is otherwise
|
||||
* needed to create an extension.
|
||||
*
|
||||
* Each blueprint has its own `kind` that helps identity and group the
|
||||
* Each blueprint has its own `kind` that helps identify and group the
|
||||
* extensions that have been created with it. For example the
|
||||
* {@link PageBlueprint} has the kind `'page'`, and extensions created with it
|
||||
* will be given the ID `'page:<plugin-id>[/<name>]'`. Blueprints should always
|
||||
|
||||
@@ -46,15 +46,15 @@ export interface InternalFrontendModule extends FrontendModule {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new module instance that can be installed in a Backstage app.
|
||||
* Creates a new module that can be installed in a Backstage app.
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* Modules are used to add or override extensions for an existing plugin. If a
|
||||
* module provides an extension with the same ID as one provided by the plugin,
|
||||
* the extension provided by the module will always take presedence.
|
||||
* the extension provided by the module will always take precedence.
|
||||
*
|
||||
* Every module instance is created for a specific plugin by providing the
|
||||
* Every module is created for a specific plugin by providing the
|
||||
* unique ID of the plugin that the module should be installed for. If that
|
||||
* plugin is not present in the app, the module will be ignored and have no
|
||||
* effect.
|
||||
@@ -67,20 +67,20 @@ export interface InternalFrontendModule extends FrontendModule {
|
||||
*
|
||||
* @example
|
||||
*
|
||||
*```tsx
|
||||
*import { createFrontendModule } from '@backstage/frontend-plugin-api';
|
||||
* ```tsx
|
||||
* import { createFrontendModule } from '@backstage/frontend-plugin-api';
|
||||
*
|
||||
*export const exampleModuleCustomPage = createFrontendModule({
|
||||
* pluginId: 'example',
|
||||
* extensions: [
|
||||
* // Overrides the default page for the 'example' plugin
|
||||
* PageBlueprint.make({
|
||||
* path: '/example',
|
||||
* loader: () => import('./CustomPage').then(m => <m.CustomPage />),
|
||||
* }),
|
||||
* ],
|
||||
*});
|
||||
*```
|
||||
* export const exampleModuleCustomPage = createFrontendModule({
|
||||
* pluginId: 'example',
|
||||
* extensions: [
|
||||
* // Overrides the default page for the 'example' plugin
|
||||
* PageBlueprint.make({
|
||||
* path: '/example',
|
||||
* loader: () => import('./CustomPage').then(m => <m.CustomPage />),
|
||||
* }),
|
||||
* ],
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
|
||||
@@ -136,11 +136,11 @@ export interface PluginOptions<
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new plugin instance that can be installed in a Backstage app.
|
||||
* Creates a new plugin that can be installed in a Backstage app.
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* Every plugin instance is created with a unique ID and a set of extensions
|
||||
* Every plugin is created with a unique ID and a set of extensions
|
||||
* that are installed as part of the plugin.
|
||||
*
|
||||
* For more information on how plugins work, see the
|
||||
|
||||
Reference in New Issue
Block a user