Backstage
    Preparing search index...
    • Creates a new extension definition for installation in a Backstage app.

      Type Parameters

      Parameters

      Returns OverridableExtensionDefinition<
          {
              config: string extends keyof TConfigSchema
                  ? {}
                  : {
                      [key in string
                      | number
                      | symbol]: TypeOf<ReturnType<TConfigSchema[key]>>
                  };
              configInput: string extends keyof TConfigSchema
                  ? {}
                  : {
                      [k in string
                      | number
                      | symbol]: baseObjectInputType<
                          {
                              [key in string
                              | number
                              | symbol]: ReturnType<TConfigSchema[key]>
                          },
                      >[k]
                  };
              inputs: TInputs;
              kind: (string | undefined) extends TKind ? undefined : TKind;
              name: (string | undefined) extends TName ? undefined : TName;
              output: UOutput extends ExtensionDataRef<IData, IId, IConfig>
                  ? ExtensionDataRef<IData, IId, IConfig>
                  : never;
              params: never;
          },
      >

      This is a low-level function for creation of extensions with arbitrary inputs and outputs and is typically only intended to be used for advanced overrides or framework-level extensions. For most extension creation needs, it is recommended to use existing ExtensionBlueprints instead. You can find blueprints both in the @backstage/frontend-plugin-api package as well as other plugin libraries. There is also a list of commonly used blueprints in the frontend system documentation.

      Extension definitions that are created with this function can be installed in a Backstage app via a FrontendPlugin or FrontendModule.

      For more details on how extensions work, see the documentation for extensions.

      const myExtension = createExtension({
      name: 'example',
      attachTo: { id: 'app', input: 'root' },
      output: [coreExtensionData.reactElement],
      factory() {
      return [coreExtensionData.reactElement(<h1>Hello, world!</h1>)];
      },
      });