From 03626e47b9a5e733b3cca482f7bafe9ec0865a0d Mon Sep 17 00:00:00 2001 From: Valery Zinchenko Date: Sun, 10 Dec 2023 20:18:31 +0300 Subject: [PATCH] remove deprecated --- src/ModalWindow.ts | 5 +---- src/types.ts | 23 +++-------------------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/ModalWindow.ts b/src/ModalWindow.ts index c769aa7..1ffdfe3 100644 --- a/src/ModalWindow.ts +++ b/src/ModalWindow.ts @@ -33,10 +33,7 @@ const DEFAULT_PARAMS: ModalParams = { closable: true, keepMounted: false, layer: 0, - label: "Content is unknown. Bad guy didn't set a label.", - - weak: false, - fork: false + label: "Content is unknown. Bad guy didn't set a label." } class ModalWindow { diff --git a/src/types.ts b/src/types.ts index 2ea7903..b4188be 100644 --- a/src/types.ts +++ b/src/types.ts @@ -49,33 +49,16 @@ export interface ModalParams { id: string | number /** * Whether to enable built-in closing mechanisms. - * + * * - `ESC` key * - `click` on the overlay * * @default true */ closable: boolean - /** - * Use `id` parameter with unique value instead. - * @example - * Modal.open(Component, { id: 1 }) - * @example - * Modal.open(Component, { id: 2 }) - * @example - * Modal.open(Component, { id: Date.now() }) - * - * @deprecated - */ - weak: boolean - /** - * Use `layer` instead. - * @deprecated - */ - fork: boolean /** * Forks the modal window to a new layer. - * + * * @default 0 */ layer: number @@ -110,7 +93,7 @@ export type ModalWindowParams

= /** * This is intented to fix errors related to passing `ModalWindowParams` to spreaded array of `ModalWindowParams`. - * + * * Removes `undefined` from `ModalWindowParams`, otherwise it will show `"'P' could be instantiated with an arbitrary type..."` error. * Even though it's ok to pass `undefined` and arbitrary type there. */