Closed v-honcharenko closed 1 year ago
@CharlesMangwa I've updated the PR, please, review it.
Please, note, in this PR I did not change any existing type like ModalComponentProp
due to backward compatibility, so issue #113 sounds reasonable. The current change will allow you to put ModalfyParams
as the latest and optional argument in the type.
Added the ability to extend the default
ModalfyParams
with a custom declaration for better DX. It doesn't make any breaking changes and should work as before ifModalfyCustomParams
interface is not overwritten.Example:
Declare your own ModalStackParams type:
In the file
react-native-modalfy.d.ts
(or in the any other place when thecreateModalStack
is called), add:declare module 'react-native-modalfy' { interface ModalfyCustomParams extends ModalStackParams {} }