Enable method signature style ESLint rule (#3849)
* Remove redundant rules handled by prettier * Turn on method-signature-style * Auto-lint files according to method-signature-style rule * Add changeset
This commit is contained in:
parent
72d4df482e
commit
8d16513eab
52 changed files with 114 additions and 112 deletions
5
.changeset/hip-owls-knock.md
Normal file
5
.changeset/hip-owls-knock.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"saleor-dashboard": patch
|
||||
---
|
||||
|
||||
Enable method signature style ESLint rule
|
|
@ -64,9 +64,6 @@
|
|||
// These rules should be reviewed - tracked in
|
||||
// Tracked in https://github.com/saleor/saleor-dashboard/issues/3813
|
||||
"@typescript-eslint/consistent-type-imports": "off",
|
||||
"@typescript-eslint/indent": "off",
|
||||
"@typescript-eslint/member-delimiter-style": "off",
|
||||
"@typescript-eslint/method-signature-style": "off",
|
||||
"@typescript-eslint/no-confusing-void-expression": "off",
|
||||
"@typescript-eslint/no-unnecessary-type-assertion": "off",
|
||||
"@typescript-eslint/prefer-reduce-type-parameter": "off",
|
||||
|
|
|
@ -22,7 +22,7 @@ interface Props {
|
|||
refetch?: () => void;
|
||||
dashboardVersion: string;
|
||||
coreVersion?: string;
|
||||
onError?(): void;
|
||||
onError?: () => void;
|
||||
}
|
||||
|
||||
const getOrigin = (url: string) => new URL(url).origin;
|
||||
|
|
|
@ -10,8 +10,8 @@ const messages = AppPermissionsDialogMessages.confirmation;
|
|||
interface Props {
|
||||
removedPermissions: PermissionEnum[];
|
||||
addedPermissions: PermissionEnum[];
|
||||
onBack(): void;
|
||||
onApprove(): void;
|
||||
onBack: () => void;
|
||||
onApprove: () => void;
|
||||
}
|
||||
|
||||
export const AppPermissionsDialogConfirmation = ({
|
||||
|
|
|
@ -10,9 +10,9 @@ const messages = AppPermissionsDialogMessages.permissionsPicker;
|
|||
interface AppPermissionsDialogPermissionPickerProps {
|
||||
allPermissions: AppPermission[];
|
||||
selected: PermissionEnum[];
|
||||
onSubmit(): void;
|
||||
onChange(codes: PermissionEnum[]): void;
|
||||
onClose(): void;
|
||||
onSubmit: () => void;
|
||||
onChange: (codes: PermissionEnum[]) => void;
|
||||
onClose: () => void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,7 +9,7 @@ import { messages } from "./messages";
|
|||
import { useStyles } from "./styles";
|
||||
|
||||
interface InstallWithManifestFormButtonProps {
|
||||
onSubmitted(manifestUrl: string): void;
|
||||
onSubmitted: (manifestUrl: string) => void;
|
||||
}
|
||||
|
||||
export const InstallWithManifestFormButton: React.FC<
|
||||
|
|
|
@ -21,11 +21,11 @@ export interface Extension {
|
|||
label: string;
|
||||
mount: AppExtensionMountEnum;
|
||||
url: string;
|
||||
open(): void;
|
||||
open: () => void;
|
||||
}
|
||||
|
||||
export interface ExtensionWithParams extends Omit<Extension, "open"> {
|
||||
open(params: AppDetailsUrlMountQueryParams): void;
|
||||
open: (params: AppDetailsUrlMountQueryParams) => void;
|
||||
}
|
||||
|
||||
export const extensionMountPoints = {
|
||||
|
|
|
@ -20,7 +20,7 @@ export interface CategoryCreatePageProps {
|
|||
disabled: boolean;
|
||||
saveButtonBarState: ConfirmButtonTransitionState;
|
||||
backUrl: string;
|
||||
onSubmit(data: CategoryCreateData);
|
||||
onSubmit: (data: CategoryCreateData) => any;
|
||||
}
|
||||
|
||||
export const CategoryCreatePage: React.FC<CategoryCreatePageProps> = ({
|
||||
|
|
|
@ -31,8 +31,8 @@ const useStyles = makeStyles(
|
|||
export interface CategoryDeleteDialogProps {
|
||||
open: boolean;
|
||||
name: string;
|
||||
onClose();
|
||||
onConfirm();
|
||||
onClose: () => any;
|
||||
onConfirm: () => any;
|
||||
}
|
||||
|
||||
const CategoryDeleteDialog: React.FC<CategoryDeleteDialogProps> = props => {
|
||||
|
|
|
@ -45,8 +45,8 @@ export interface CategoryUpdatePageProps {
|
|||
onProductsDelete: () => void;
|
||||
onSelectProductsIds: (ids: number[], clearSelection: () => void) => void;
|
||||
onSelectCategoriesIds: (ids: number[], clearSelection: () => void) => void;
|
||||
onImageUpload(file: File);
|
||||
onDelete();
|
||||
onImageUpload: (file: File) => any;
|
||||
onDelete: () => any;
|
||||
}
|
||||
|
||||
const CategoriesTab = Tab(CategoryPageTab.categories);
|
||||
|
|
|
@ -16,7 +16,7 @@ export interface ActionDialogProps extends DialogProps {
|
|||
title: string;
|
||||
variant?: ActionDialogVariant;
|
||||
backButtonText?: string;
|
||||
onConfirm();
|
||||
onConfirm: () => any;
|
||||
}
|
||||
|
||||
const ActionDialog: React.FC<ActionDialogProps> = props => {
|
||||
|
|
|
@ -18,7 +18,7 @@ interface DialogButtonsProps {
|
|||
children?: React.ReactNode;
|
||||
showBackButton?: boolean;
|
||||
backButtonText?: string;
|
||||
onConfirm();
|
||||
onConfirm: () => any;
|
||||
}
|
||||
|
||||
const DialogButtons: React.FC<DialogButtonsProps> = props => {
|
||||
|
|
|
@ -32,8 +32,8 @@ interface AddressEditProps {
|
|||
data: AddressTypeInput;
|
||||
disabled?: boolean;
|
||||
errors: Array<AccountErrorFragment | OrderErrorFragment>;
|
||||
onChange(event: React.ChangeEvent<any>);
|
||||
onCountryChange(event: React.ChangeEvent<any>);
|
||||
onChange: (event: React.ChangeEvent<any>) => any;
|
||||
onCountryChange: (event: React.ChangeEvent<any>) => any;
|
||||
}
|
||||
|
||||
const PossibleFormFields = {
|
||||
|
|
|
@ -18,7 +18,7 @@ import { useStyles } from "./styles";
|
|||
interface Option {
|
||||
label: string;
|
||||
disabled?: boolean;
|
||||
onSelect(e: React.MouseEvent<HTMLLIElement, MouseEvent>): void;
|
||||
onSelect: (e: React.MouseEvent<HTMLLIElement, MouseEvent>) => void;
|
||||
}
|
||||
|
||||
export interface ButtonWithSelectProps
|
||||
|
|
|
@ -11,7 +11,7 @@ export interface ControlledCheckboxProps {
|
|||
disabled?: boolean;
|
||||
checkedIcon?: React.ReactNode;
|
||||
testId?: string;
|
||||
onChange(event: any);
|
||||
onChange: (event: any) => any;
|
||||
}
|
||||
|
||||
export const ControlledCheckbox: React.FC<ControlledCheckboxProps> = ({
|
||||
|
|
|
@ -20,7 +20,7 @@ interface ControlledSwitchProps {
|
|||
name: string;
|
||||
secondLabel?: string | React.ReactNode;
|
||||
uncheckedLabel?: string | React.ReactNode;
|
||||
onChange?(event: React.ChangeEvent<any>);
|
||||
onChange?: (event: React.ChangeEvent<any>) => any;
|
||||
}
|
||||
|
||||
export const ControlledSwitch: React.FC<ControlledSwitchProps> = props => {
|
||||
|
|
|
@ -50,7 +50,7 @@ interface EditableTableCellProps {
|
|||
focused?: boolean;
|
||||
InputProps?: TextFieldProps;
|
||||
value: string;
|
||||
onConfirm(value: string): any;
|
||||
onConfirm: (value: string) => any;
|
||||
}
|
||||
|
||||
export const EditableTableCell: React.FC<EditableTableCellProps> = props => {
|
||||
|
|
|
@ -6,7 +6,7 @@ import React from "react";
|
|||
import { useIntl } from "react-intl";
|
||||
|
||||
export interface FilterCardProps {
|
||||
handleClear();
|
||||
handleClear: () => any;
|
||||
}
|
||||
|
||||
const FilterCard: React.FC<FilterCardProps> = ({ children, handleClear }) => {
|
||||
|
|
|
@ -44,7 +44,7 @@ interface MultiSelectFieldProps {
|
|||
name?: string;
|
||||
selectProps?: SelectProps;
|
||||
value?: string[];
|
||||
onChange(event: any);
|
||||
onChange: (event: any) => any;
|
||||
}
|
||||
|
||||
export const MultiSelectField: React.FC<MultiSelectFieldProps> = props => {
|
||||
|
|
|
@ -21,7 +21,7 @@ interface PhoneFieldProps {
|
|||
number: string;
|
||||
prefixes: string[];
|
||||
label?: string;
|
||||
onChange(event: React.ChangeEvent<any>);
|
||||
onChange: (event: React.ChangeEvent<any>) => any;
|
||||
}
|
||||
|
||||
const PhoneField: React.FC<PhoneFieldProps> = props => {
|
||||
|
|
|
@ -43,7 +43,7 @@ export interface PriceFieldProps {
|
|||
inputProps?: InputProps["inputProps"];
|
||||
InputLabelProps?: InputLabelProps;
|
||||
required?: boolean;
|
||||
onChange(event: any);
|
||||
onChange: (event: any) => any;
|
||||
}
|
||||
|
||||
export const PriceField: React.FC<PriceFieldProps> = props => {
|
||||
|
|
|
@ -34,7 +34,7 @@ interface RowNumberSelectProps {
|
|||
choices: number[];
|
||||
className?: string;
|
||||
rowNumber: number;
|
||||
onChange(value: number);
|
||||
onChange: (value: number) => any;
|
||||
}
|
||||
|
||||
const RowNumberSelect: React.FC<RowNumberSelectProps> = ({
|
||||
|
|
|
@ -54,8 +54,8 @@ interface SeoFormProps {
|
|||
slug: string;
|
||||
slugPlaceholder?: string;
|
||||
titlePlaceholder: string;
|
||||
onChange(event: any);
|
||||
onClick?();
|
||||
onChange: (event: any) => any;
|
||||
onClick?: () => any;
|
||||
}
|
||||
|
||||
export const SeoForm: React.FC<SeoFormProps> = props => {
|
||||
|
|
|
@ -60,7 +60,7 @@ interface SingleSelectFieldProps {
|
|||
placeholder?: string;
|
||||
value?: string;
|
||||
InputProps?: OutlinedInputProps;
|
||||
onChange(event: any);
|
||||
onChange: (event: any) => any;
|
||||
}
|
||||
|
||||
export const SingleSelectField: React.FC<SingleSelectFieldProps> = props => {
|
||||
|
|
|
@ -58,8 +58,8 @@ export interface TablePaginationActionsProps {
|
|||
hasNextPage: boolean;
|
||||
hasPreviousPage: boolean;
|
||||
nextIconButtonProps?: any;
|
||||
onNextPage(event);
|
||||
onPreviousPage(event);
|
||||
onNextPage: (event) => any;
|
||||
onPreviousPage: (event) => any;
|
||||
}
|
||||
|
||||
export const TablePaginationActions: React.FC<
|
||||
|
|
|
@ -67,8 +67,8 @@ interface TimelineAddNoteProps {
|
|||
disabled?: boolean;
|
||||
message: string;
|
||||
reset: () => void;
|
||||
onChange(event: React.ChangeEvent<any>);
|
||||
onSubmit(event: React.FormEvent<any>);
|
||||
onChange: (event: React.ChangeEvent<any>) => any;
|
||||
onSubmit: (event: React.FormEvent<any>) => any;
|
||||
}
|
||||
|
||||
export const Timeline: React.FC<TimelineProps> = props => {
|
||||
|
|
|
@ -26,8 +26,8 @@ export interface CustomerCreateAddressProps {
|
|||
data: AddressTypeInput;
|
||||
disabled: boolean;
|
||||
errors: AccountErrorFragment[];
|
||||
onChange(event: React.ChangeEvent<any>);
|
||||
onCountryChange(event: React.ChangeEvent<any>);
|
||||
onChange: (event: React.ChangeEvent<any>) => any;
|
||||
onCountryChange: (event: React.ChangeEvent<any>) => any;
|
||||
}
|
||||
|
||||
const CustomerCreateAddress: React.FC<CustomerCreateAddressProps> = props => {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { FlagList } from "./availableFlags";
|
||||
|
||||
export interface Strategy {
|
||||
fetchAll(): Promise<FlagList>;
|
||||
fetchAll: () => Promise<FlagList>;
|
||||
}
|
||||
|
||||
export interface PersistableStrategy extends Strategy {
|
||||
store?(flags: FlagList): Promise<void>;
|
||||
store?: (flags: FlagList) => Promise<void>;
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ export interface OrderChangeWarehouseDialogProps {
|
|||
line: OrderFulfillLineFragment;
|
||||
currentWarehouseId: string;
|
||||
onConfirm: (warehouse: WarehouseFragment) => void;
|
||||
onClose();
|
||||
onClose: () => any;
|
||||
}
|
||||
|
||||
export const OrderChangeWarehouseDialog: React.FC<
|
||||
|
|
|
@ -64,10 +64,10 @@ export interface OrderCustomerAddressesEditDialogProps {
|
|||
customerAddresses?: AddressFragment[];
|
||||
defaultShippingAddress?: Node;
|
||||
defaultBillingAddress?: Node;
|
||||
onClose();
|
||||
onConfirm(
|
||||
onClose: () => any;
|
||||
onConfirm: (
|
||||
data: Partial<OrderCustomerAddressesEditDialogOutput>,
|
||||
): SubmitPromise<any[]>;
|
||||
) => SubmitPromise<any[]>;
|
||||
}
|
||||
|
||||
const defaultSearchState: OrderCustomerSearchAddressState = {
|
||||
|
|
|
@ -35,7 +35,7 @@ export interface OrderCustomerAddressesSearchProps {
|
|||
customerAddresses: AddressFragment[];
|
||||
onChangeCustomerShippingAddress: (customerAddress: AddressFragment) => void;
|
||||
onChangeCustomerBillingAddress: (customerAddress: AddressFragment) => void;
|
||||
exitSearch();
|
||||
exitSearch: () => any;
|
||||
}
|
||||
|
||||
const OrderCustomerAddressesSearch: React.FC<
|
||||
|
|
|
@ -25,7 +25,7 @@ import { useStyles } from "./styles";
|
|||
export interface OrderCustomerChangeDialogProps {
|
||||
open: boolean;
|
||||
onConfirm: (data: OrderCustomerChangeData) => void;
|
||||
onClose();
|
||||
onClose: () => any;
|
||||
}
|
||||
|
||||
const OrderCustomerChangeDialog: React.FC<
|
||||
|
|
|
@ -64,27 +64,27 @@ export interface OrderDetailsPageProps {
|
|||
) => void;
|
||||
onOrderLineRemove?: (id: string) => void;
|
||||
onShippingMethodEdit?: () => void;
|
||||
onBillingAddressEdit();
|
||||
onFulfillmentApprove(id: string);
|
||||
onFulfillmentCancel(id: string);
|
||||
onFulfillmentTrackingNumberUpdate(id: string);
|
||||
onOrderFulfill();
|
||||
onProductClick?(id: string);
|
||||
onPaymentCapture();
|
||||
onMarkAsPaid();
|
||||
onPaymentRefund();
|
||||
onPaymentVoid();
|
||||
onShippingAddressEdit();
|
||||
onOrderCancel();
|
||||
onNoteAdd(data: HistoryFormData);
|
||||
onProfileView();
|
||||
onOrderReturn();
|
||||
onInvoiceClick(invoiceId: string);
|
||||
onInvoiceGenerate();
|
||||
onInvoiceSend(invoiceId: string);
|
||||
onTransactionAction(transactionId: string, actionType: TransactionActionEnum);
|
||||
onAddManualTransaction();
|
||||
onSubmit(data: MetadataIdSchema): SubmitPromise;
|
||||
onBillingAddressEdit: () => any;
|
||||
onFulfillmentApprove: (id: string) => any;
|
||||
onFulfillmentCancel: (id: string) => any;
|
||||
onFulfillmentTrackingNumberUpdate: (id: string) => any;
|
||||
onOrderFulfill: () => any;
|
||||
onProductClick?: (id: string) => any;
|
||||
onPaymentCapture: () => any;
|
||||
onMarkAsPaid: () => any;
|
||||
onPaymentRefund: () => any;
|
||||
onPaymentVoid: () => any;
|
||||
onShippingAddressEdit: () => any;
|
||||
onOrderCancel: () => any;
|
||||
onNoteAdd: (data: HistoryFormData) => any;
|
||||
onProfileView: () => any;
|
||||
onOrderReturn: () => any;
|
||||
onInvoiceClick: (invoiceId: string) => any;
|
||||
onInvoiceGenerate: () => any;
|
||||
onInvoiceSend: (invoiceId: string) => any;
|
||||
onTransactionAction: (transactionId: string, actionType: TransactionActionEnum) => any;
|
||||
onAddManualTransaction: () => any;
|
||||
onSubmit: (data: MetadataIdSchema) => SubmitPromise;
|
||||
}
|
||||
|
||||
const OrderDetailsPage: React.FC<OrderDetailsPageProps> = props => {
|
||||
|
|
|
@ -27,8 +27,8 @@ export interface OrderFulfillStockExceededDialogProps {
|
|||
open: boolean;
|
||||
formsetData: OrderFulfillStockFormsetData;
|
||||
confirmButtonState: ConfirmButtonTransitionState;
|
||||
onSubmit();
|
||||
onClose();
|
||||
onSubmit: () => any;
|
||||
onClose: () => any;
|
||||
}
|
||||
|
||||
const OrderFulfillStockExceededDialog: React.FC<
|
||||
|
|
|
@ -17,8 +17,8 @@ interface AcionButtonsProps {
|
|||
orderIsPaid?: boolean;
|
||||
fulfillmentAllowUnpaid: boolean;
|
||||
hasTransactions: boolean;
|
||||
onTrackingCodeAdd();
|
||||
onApprove();
|
||||
onTrackingCodeAdd: () => any;
|
||||
onApprove: () => any;
|
||||
}
|
||||
|
||||
const statusesToShow = [
|
||||
|
|
|
@ -29,8 +29,8 @@ export interface OrderFulfillmentAcceptDialogProps {
|
|||
confirmButtonState: ConfirmButtonTransitionState;
|
||||
errors: OrderErrorFragment[];
|
||||
open: boolean;
|
||||
onClose(): void;
|
||||
onConfirm(data: OrderFulfillmentAcceptDialogFormData): void;
|
||||
onClose: () => void;
|
||||
onConfirm: (data: OrderFulfillmentAcceptDialogFormData) => void;
|
||||
}
|
||||
|
||||
const OrderFulfillmentAcceptDialog: React.FC<
|
||||
|
|
|
@ -46,8 +46,8 @@ export interface OrderFulfillmentCancelDialogProps {
|
|||
errors: OrderErrorFragment[];
|
||||
open: boolean;
|
||||
warehouses: WarehouseFragment[];
|
||||
onClose();
|
||||
onConfirm(data: OrderFulfillmentCancelDialogFormData);
|
||||
onClose: () => any;
|
||||
onConfirm: (data: OrderFulfillmentCancelDialogFormData) => any;
|
||||
}
|
||||
|
||||
const OrderFulfillmentCancelDialog: React.FC<
|
||||
|
|
|
@ -31,8 +31,8 @@ export interface OrderFulfillmentTrackingDialogProps {
|
|||
errors: OrderErrorFragment[];
|
||||
open: boolean;
|
||||
trackingNumber: string;
|
||||
onClose();
|
||||
onConfirm(data: FormData);
|
||||
onClose: () => any;
|
||||
onConfirm: (data: FormData) => any;
|
||||
}
|
||||
|
||||
const OrderFulfillmentTrackingDialog: React.FC<
|
||||
|
|
|
@ -14,12 +14,12 @@ import { OrderTransactionsWrapper } from "./OrderTransactionsWrapper";
|
|||
export interface OrderPaymentOrTransactionProps {
|
||||
order: OrderDetailsFragment;
|
||||
shop: OrderDetailsQuery["shop"];
|
||||
onTransactionAction(transactionId: string, actionType: TransactionActionEnum);
|
||||
onPaymentCapture();
|
||||
onPaymentVoid();
|
||||
onPaymentRefund();
|
||||
onMarkAsPaid();
|
||||
onAddManualTransaction();
|
||||
onTransactionAction: (transactionId: string, actionType: TransactionActionEnum) => any;
|
||||
onPaymentCapture: () => any;
|
||||
onPaymentVoid: () => any;
|
||||
onPaymentRefund: () => any;
|
||||
onMarkAsPaid: () => any;
|
||||
onAddManualTransaction: () => any;
|
||||
}
|
||||
|
||||
export const OrderPaymentOrTransaction: React.FC<
|
||||
|
|
|
@ -20,11 +20,11 @@ import { getFilteredPayments } from "./utils";
|
|||
interface OrderTransactionsWrapper {
|
||||
order: OrderDetailsFragment;
|
||||
shop: OrderDetailsQuery["shop"];
|
||||
onTransactionAction(transactionId: string, actionType: TransactionActionEnum);
|
||||
onPaymentCapture();
|
||||
onMarkAsPaid();
|
||||
onPaymentVoid();
|
||||
onAddManualTransaction();
|
||||
onTransactionAction: (transactionId: string, actionType: TransactionActionEnum) => any;
|
||||
onPaymentCapture: () => any;
|
||||
onMarkAsPaid: () => any;
|
||||
onPaymentVoid: () => any;
|
||||
onAddManualTransaction: () => any;
|
||||
}
|
||||
|
||||
export const OrderTransactionsWrapper: React.FC<OrderTransactionsWrapper> = ({
|
||||
|
|
|
@ -22,8 +22,8 @@ export interface OrderPaymentVoidDialogProps {
|
|||
confirmButtonState: ConfirmButtonTransitionState;
|
||||
errors: OrderErrorFragment[];
|
||||
open: boolean;
|
||||
onClose?();
|
||||
onConfirm?();
|
||||
onClose?: () => any;
|
||||
onConfirm?: () => any;
|
||||
}
|
||||
|
||||
const OrderPaymentVoidDialog: React.FC<OrderPaymentVoidDialogProps> = ({
|
||||
|
|
|
@ -103,7 +103,7 @@ interface OrderReturnRefundLinesCardProps {
|
|||
itemsSelections: FormsetReplacementData;
|
||||
itemsQuantities: FormsetQuantityData;
|
||||
onChangeSelected: FormsetChange<boolean>;
|
||||
onSetMaxQuantity();
|
||||
onSetMaxQuantity: () => any;
|
||||
}
|
||||
|
||||
const ItemsCard: React.FC<OrderReturnRefundLinesCardProps> = ({
|
||||
|
|
|
@ -44,7 +44,7 @@ interface OrderReturnRefundLinesCardProps {
|
|||
itemsSelections: FormsetReplacementData;
|
||||
itemsQuantities: FormsetQuantityData;
|
||||
onChangeSelected: FormsetChange<boolean>;
|
||||
onSetMaxQuantity();
|
||||
onSetMaxQuantity: () => any;
|
||||
}
|
||||
|
||||
export const ItemsCard: React.FC<OrderReturnRefundLinesCardProps> = ({
|
||||
|
|
|
@ -66,8 +66,8 @@ export interface OrderShippingMethodEditDialogProps {
|
|||
open: boolean;
|
||||
shippingMethod: string;
|
||||
shippingMethods?: OrderDetailsFragment["shippingMethods"];
|
||||
onClose();
|
||||
onSubmit?(data: FormData);
|
||||
onClose: () => any;
|
||||
onSubmit?: (data: FormData) => any;
|
||||
}
|
||||
|
||||
const OrderShippingMethodEditDialog: React.FC<
|
||||
|
|
|
@ -95,7 +95,7 @@ interface ProductCreatePageProps {
|
|||
onAttributeSelectBlur: () => void;
|
||||
onCloseDialog: (currentParams?: ProductCreateUrlQueryParams) => void;
|
||||
onSelectProductType: (productTypeId: string) => void;
|
||||
onSubmit?(data: ProductCreateData);
|
||||
onSubmit?: (data: ProductCreateData) => any;
|
||||
}
|
||||
|
||||
export const ProductCreatePage: React.FC<ProductCreatePageProps> = ({
|
||||
|
|
|
@ -20,7 +20,7 @@ interface ProductDetailsFormProps {
|
|||
disabled?: boolean;
|
||||
errors: ProductErrorFragment[];
|
||||
|
||||
onChange(event: any);
|
||||
onChange: (event: any) => any;
|
||||
}
|
||||
|
||||
export const ProductDetailsForm: React.FC<ProductDetailsFormProps> = ({
|
||||
|
|
|
@ -71,8 +71,8 @@ interface ProductMediaProps {
|
|||
getImageEditUrl: (id: string) => string;
|
||||
onImageDelete: (id: string) => () => void;
|
||||
onImageReorder?: ReorderAction;
|
||||
onImageUpload(file: File);
|
||||
openMediaUrlModal();
|
||||
onImageUpload: (file: File) => any;
|
||||
openMediaUrlModal: () => any;
|
||||
}
|
||||
|
||||
const ProductMedia: React.FC<ProductMediaProps> = props => {
|
||||
|
|
|
@ -113,11 +113,11 @@ export interface ProductUpdatePageProps {
|
|||
onSubmit: (data: ProductUpdateSubmitData) => SubmitPromise;
|
||||
onVariantShow: (id: string) => void;
|
||||
onAttributeSelectBlur: () => void;
|
||||
onDelete();
|
||||
onImageReorder?(event: { oldIndex: number; newIndex: number });
|
||||
onImageUpload(file: File);
|
||||
onMediaUrlUpload(mediaUrl: string);
|
||||
onSeoClick?();
|
||||
onDelete: () => any;
|
||||
onImageReorder?: (event: { oldIndex: number; newIndex: number }) => any;
|
||||
onImageUpload: (file: File) => any;
|
||||
onMediaUrlUpload: (mediaUrl: string) => any;
|
||||
onSeoClick?: () => any;
|
||||
}
|
||||
|
||||
export const ProductUpdatePage: React.FC<ProductUpdatePageProps> = ({
|
||||
|
|
|
@ -32,8 +32,8 @@ export interface ProductVariantDeleteDialogProps {
|
|||
confirmButtonState: ConfirmButtonTransitionState;
|
||||
open: boolean;
|
||||
name: string;
|
||||
onClose?();
|
||||
onConfirm?();
|
||||
onClose?: () => any;
|
||||
onConfirm?: () => any;
|
||||
}
|
||||
|
||||
const ProductVariantDeleteDialog: React.FC<
|
||||
|
|
|
@ -62,7 +62,7 @@ interface ProductVariantMediaProps {
|
|||
media?: ProductMediaFragment[];
|
||||
placeholderImage?: string;
|
||||
disabled: boolean;
|
||||
onImageAdd();
|
||||
onImageAdd: () => any;
|
||||
}
|
||||
|
||||
export const ProductVariantMedia: React.FC<
|
||||
|
|
|
@ -118,10 +118,10 @@ interface ProductVariantPageProps {
|
|||
variantDeactivatePreoderButtonState: ConfirmButtonTransitionState;
|
||||
onVariantReorder: ReorderAction;
|
||||
onAttributeSelectBlur: () => void;
|
||||
onDelete();
|
||||
onSubmit(data: ProductVariantUpdateSubmitData);
|
||||
onSetDefaultVariant();
|
||||
onWarehouseConfigure();
|
||||
onDelete: () => any;
|
||||
onSubmit: (data: ProductVariantUpdateSubmitData) => any;
|
||||
onSetDefaultVariant: () => any;
|
||||
onWarehouseConfigure: () => any;
|
||||
}
|
||||
|
||||
const ProductVariantPage: React.FC<ProductVariantPageProps> = ({
|
||||
|
|
|
@ -59,7 +59,7 @@ export interface StaffDetailsPageProps extends SearchPageProps {
|
|||
onDelete: () => void;
|
||||
onImageDelete: () => void;
|
||||
onSubmit: (data: StaffDetailsFormData) => SubmitPromise;
|
||||
onImageUpload(file: File);
|
||||
onImageUpload: (file: File) => any;
|
||||
}
|
||||
|
||||
const StaffDetailsPage: React.FC<StaffDetailsPageProps> = ({
|
||||
|
|
Loading…
Reference in a new issue