use-tus 0.7.1 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { FC } from "react";
2
2
  import { DefaultOptions } from "./types";
3
- export declare type TusClientProviderProps = Readonly<{
3
+ export type TusClientProviderProps = Readonly<{
4
4
  children?: React.ReactNode;
5
5
  defaultOptions?: DefaultOptions;
6
6
  }>;
@@ -1,6 +1,6 @@
1
1
  import type { Upload } from "tus-js-client";
2
2
  import { DefaultOptions } from "../types";
3
- export declare type TusClientActions = ReturnType<typeof insertUploadInstance | typeof removeUploadInstance | typeof updateSuccessUpload | typeof updateErrorUpload | typeof updateIsAbortedUpload | typeof resetClient | typeof updateDefaultOptions>;
3
+ export type TusClientActions = ReturnType<typeof insertUploadInstance | typeof removeUploadInstance | typeof updateSuccessUpload | typeof updateErrorUpload | typeof updateIsAbortedUpload | typeof resetClient | typeof updateDefaultOptions>;
4
4
  export declare const insertUploadInstance: (cacheKey: string, upload: Upload) => {
5
5
  readonly type: "INSERT_UPLOAD_INSTANCE";
6
6
  readonly payload: {
@@ -2,13 +2,13 @@ import type { Reducer } from "react";
2
2
  import type { Upload } from "tus-js-client";
3
3
  import { DefaultOptions } from "../types";
4
4
  import { TusClientActions } from "./tucClientActions";
5
- export declare type UploadState = {
5
+ export type UploadState = {
6
6
  upload: Upload | undefined;
7
7
  isSuccess: boolean;
8
8
  isAborted: boolean;
9
9
  error?: Error;
10
10
  };
11
- export declare type TusClientState = {
11
+ export type TusClientState = {
12
12
  uploads: {
13
13
  [cacheKey: string]: UploadState | undefined;
14
14
  };
@@ -1,2 +1,2 @@
1
1
  import { Upload, UploadOptions } from "tus-js-client";
2
- export declare type DefaultOptions = (file: Upload["file"]) => UploadOptions;
2
+ export type DefaultOptions = (file: Upload["file"]) => UploadOptions;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { Meta } from "@storybook/react";
3
- declare const _default: Meta<import("@storybook/react").Args>;
4
- export default _default;
5
2
  export declare const Basic: () => JSX.Element;
3
+ declare const _default: {
4
+ title: string;
5
+ component: () => JSX.Element;
6
+ };
7
+ export default _default;
@@ -1,9 +1,9 @@
1
- import { ComponentProps } from "react";
2
- declare type BasicButtonProps = {
1
+ import { ComponentProps, FC } from "react";
2
+ type BasicButtonProps = {
3
3
  onClick: ComponentProps<"button">["onClick"];
4
4
  title: string;
5
5
  disabled?: ComponentProps<"button">["disabled"];
6
6
  styleColor?: "primary" | "basic" | "error";
7
7
  };
8
- export declare const BasicButton: import("react").ForwardRefExoticComponent<BasicButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
8
+ export declare const BasicButton: FC<BasicButtonProps>;
9
9
  export {};
@@ -1,5 +1,5 @@
1
1
  import { FC } from "react";
2
- declare type ProgressBarProps = {
2
+ type ProgressBarProps = {
3
3
  title?: string;
4
4
  value?: number;
5
5
  };
@@ -1,10 +1,4 @@
1
1
  /// <reference types="jest" />
2
- /// <reference types="webpack-env" />
3
- /// <reference types="node" />
4
- /// <reference types="node" />
5
- /// <reference types="node" />
6
- /// <reference types="node" />
7
- /// <reference types="node" />
8
- export declare const createConsoleErrorMock: () => jest.SpyInstance<void, [message?: any, ...optionalParams: any[]]>;
2
+ export declare const createConsoleErrorMock: () => jest.SpyInstance<void, [message?: any, ...optionalParams: any[]], any>;
9
3
  export declare const insertEnvValue: (value: NodeJS.Process["env"]) => void;
10
- export declare const startOrResumeUploadMock: jest.SpyInstance<void, [upload: import("tus-js-client").Upload]>;
4
+ export declare const startOrResumeUploadMock: jest.SpyInstance<void, [upload: import("tus-js-client").Upload], any>;