Skip to content

Commit

Permalink
Drop support for TypeScript 3.7 and below
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrgl committed Jun 30, 2023
1 parent 32e5482 commit c712395
Showing 1 changed file with 11 additions and 23 deletions.
34 changes: 11 additions & 23 deletions src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import toast from './core/toast';
// Type re-export workaround, to stay compatible with TS 3.7 and lower
import type {
ToastOptions as _ToastOptions,
ToastPosition as _ToastPosition,
Toast as _Toast,
Renderable as _Renderable,
ValueOrFunction as _ValueOrFunction,
ToasterProps as _ToasterProps,
DefaultToastOptions as _DefaultToastOptions,
IconTheme as _IconTheme,
ToastType as _ToastType,
ValueFunction as _ValueFunction
export type {
ToastOptions,
ToastPosition,
Toast,
Renderable,
ValueOrFunction,
ToasterProps,
DefaultToastOptions,
IconTheme,
ToastType,
ValueFunction
} from './core/types';

export { default as useToaster } from './core/use-toaster';
Expand All @@ -23,16 +22,5 @@ export { default as ErrorIcon } from './components/ErrorIcon.svelte';
export { default as LoaderIcon } from './components/LoaderIcon.svelte';
export { resolveValue } from './core/types';

export type ToastOptions = _ToastOptions;
export type ToastPosition = _ToastPosition;
export type Toast = _Toast;
export type Renderable = _Renderable;
export type ValueOrFunction<TValue, TArg> = _ValueOrFunction<TValue, TArg>;
export type ToasterProps = _ToasterProps;
export type DefaultToastOptions = _DefaultToastOptions;
export type IconTheme = _IconTheme;
export type ToastType = _ToastType;
export type ValueFunction<TArg, TValue> = _ValueFunction<TArg, TValue>;

export { toast };
export default toast;

1 comment on commit c712395

@vercel
Copy link

@vercel vercel bot commented on c712395 Jun 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.