Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Type improvements
dominik-zeglend79c28b0a9c3
diff --git a/saleor/static/dashboard-next/index.tsx b/saleor/static/dashboard-next/index.tsxindex 87a6b9eb15..d62066520e 100644--- a/saleor/static/dashboard-next/index.tsx+++ b/saleor/static/dashboard-next/index.tsx@@ -76,7 +76,7 @@ export interface UserError {// These interfaces are used in atomic mutation providers, which then are// combined into one compound mutation provider-export interface PartialMutationProviderProps<T extends {}> {+export interface PartialMutationProviderProps<T extends {} = {}> {onSuccess?: (data: T) => void;onError?: (error: ApolloError) => void;}diff --git a/saleor/static/dashboard-next/products/containers/ProductUpdateOperations.tsx b/saleor/static/dashboard-next/products/containers/ProductUpdateOperations.tsxindex 5ddf36bb59..83ce85a76c 100644--- a/saleor/static/dashboard-next/products/containers/ProductUpdateOperations.tsx+++ b/saleor/static/dashboard-next/products/containers/ProductUpdateOperations.tsx@@ -1,6 +1,5 @@import * as React from "react";-import { ApolloError } from "apollo-client";import {MutationProviderProps,MutationProviderRenderProps,@@ -32,12 +31,10 @@ import ProductUpdateProvider from "./ProductUpdate";interface ProductDeleteProviderPropsextends PartialMutationProviderProps<ProductDeleteMutation> {productId: string;- children: ((- props: PartialMutationProviderRenderProps<- ProductDeleteMutation,- ProductDeleteMutationVariables- >- ) => React.ReactElement<any>);+ children: PartialMutationProviderRenderProps<+ ProductDeleteMutation,+ ProductDeleteMutationVariables+ >;}const ProductDeleteProvider: React.StatelessComponent<@@ -63,12 +60,10 @@ const ProductDeleteProvider: React.StatelessComponent<interface ProductImageCreateProviderPropsextends PartialMutationProviderProps<ProductImageCreateMutation> {productId: string;- children: ((- props: PartialMutationProviderRenderProps<- ProductImageCreateMutation,- ProductImageCreateMutationVariables- >- ) => React.ReactElement<any>);+ children: PartialMutationProviderRenderProps<+ ProductImageCreateMutation,+ ProductImageCreateMutationVariables+ >;}const ProductImageCreateProvider: React.StatelessComponent<diff --git a/saleor/static/dashboard-next/products/views/ProductUpdate.tsx b/saleor/static/dashboard-next/products/views/ProductUpdate.tsxindex d434723e93..ce7c65fc92 100644--- a/saleor/static/dashboard-next/products/views/ProductUpdate.tsx+++ b/saleor/static/dashboard-next/products/views/ProductUpdate.tsx@@ -1,6 +1,7 @@import * as React from "react";import { arrayMove } from "react-sortable-hoc";+import { ApolloError } from "apollo-client";import * as placeholderImg from "../../../images/placeholder255x255.png";import { categoryShowUrl } from "../../categories";import ErrorMessageCard from "../../components/ErrorMessageCard";@@ -11,7 +12,6 @@ import ProductUpdatePage from "../components/ProductUpdatePage";import ProductUpdateOperations from "../containers/ProductUpdateOperations";import { productListUrl, productVariantEditUrl } from "../index";import { productDetailsQuery, TypedProductDetailsQuery } from "../queries";-import { ApolloError } from "apollo-client";interface ProductUpdateProps {id: string;