Skip to content

Commit 305ca33

Browse files
paulmand3lfacebook-github-bot
authored andcommitted
Adding AlertOptions to ts Alert.prompt function (#35957)
Summary: Bringing the typescript function signature in-line with the js code. ## Changelog [GENERAL] [FIXED] - Added AlertOptions argument to the type definition for Alert.prompt to bring it into parity with the js code. <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> Pull Request resolved: #35957 Test Plan: Before the change, VS Code would show a typescript error when I pass AlertOptions to Alert.prompt (even though the js would execute successfully and respect the options I passed. After the change, when I use an Alert.prompt in VS code the function signature was recognized without errors. Reviewed By: christophpurrer Differential Revision: D42737818 Pulled By: jacdebug fbshipit-source-id: 4d4318f38f5c7b7302aae62de5ce224db67e088a
1 parent d5e6d9c commit 305ca33

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Libraries/Alert/Alert.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export interface AlertStatic {
7777
type?: AlertType,
7878
defaultValue?: string,
7979
keyboardType?: string,
80+
options?: AlertOptions,
8081
) => void;
8182
}
8283

0 commit comments

Comments
 (0)