chore: fixing the type for the return of the createNextScaffolderFieldExtension
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -14,10 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import type { FieldValidation } from '@rjsf/core';
|
||||
import type { FieldValidation } from '@rjsf/utils';
|
||||
import {
|
||||
createNextScaffolderFieldExtension,
|
||||
createScaffolderFieldExtension,
|
||||
FieldExtensionComponentProps,
|
||||
NextFieldExtensionComponentProps,
|
||||
scaffolderPlugin,
|
||||
} from '@backstage/plugin-scaffolder';
|
||||
|
||||
@@ -64,7 +66,7 @@ export const LowerCaseValuePickerFieldExtension = scaffolderPlugin.provide(
|
||||
);
|
||||
|
||||
const MockDelayComponent = (
|
||||
props: FieldExtensionComponentProps<{ test?: string }>,
|
||||
props: NextFieldExtensionComponentProps<{ test?: string }>,
|
||||
) => {
|
||||
const { onChange, formData, rawErrors } = props;
|
||||
return (
|
||||
@@ -80,7 +82,7 @@ const MockDelayComponent = (
|
||||
};
|
||||
|
||||
export const DelayingComponentFieldExtension = scaffolderPlugin.provide(
|
||||
createScaffolderFieldExtension({
|
||||
createNextScaffolderFieldExtension({
|
||||
name: 'DelayingComponent',
|
||||
component: MockDelayComponent,
|
||||
validation: async (
|
||||
|
||||
@@ -72,7 +72,7 @@ export function createNextScaffolderFieldExtension<
|
||||
TInputProps extends UIOptionsType = {},
|
||||
>(
|
||||
options: NextFieldExtensionOptions<TReturnValue, TInputProps>,
|
||||
): Extension<NextFieldExtensionComponentProps<TReturnValue, TInputProps>> {
|
||||
): Extension<React.ComponentType> {
|
||||
return {
|
||||
expose() {
|
||||
const FieldExtensionDataHolder: any = () => null;
|
||||
|
||||
Reference in New Issue
Block a user