colorfy-software / react-native-modalfy

🥞 Modal citizen of React Native.
https://colorfy-software.gitbook.io/react-native-modalfy
MIT License
1.08k stars 44 forks source link

Incorrect typings for closeModal #31

Closed joeyfigaro closed 3 years ago

joeyfigaro commented 3 years ago
/**
   * This function closes the currently displayed modal by default.
   *
   * You can also provide a `modalName` if you want to close
   * a different modal than the latest opened.
   *
   * @example modalfy().closeModal()
   * @see https://colorfy-software.gitbook.io/react-native-modalfy/api/types/modalprop#closemodal
   */
  closeModal: () => ModalState.closeModal()

Current typings specify that closeModal takes 0 arguments, but the note/comment states that it takes an optional modal identifier.

CharlesMangwa commented 3 years ago

Hey @joeyfigaro! Good catch, this seems to be a bigger issue regarding how this specific feature was supposed to work. It was fixed in eb1b5265548fbc3d499b4da1b76d606eb7a60e25 and will soon be available in v2.2.0.