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 (