chore: fixing the type for the return of the createNextScaffolderFieldExtension

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2022-11-10 17:35:09 +01:00
parent af5d2741da
commit c1f5541d5c
2 changed files with 6 additions and 4 deletions
@@ -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 (
+1 -1
View File
@@ -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;