From 305ca337c0471c61cb74216bd93ae3f1a232a89f Mon Sep 17 00:00:00 2001 From: Paul Mandel Date: Wed, 25 Jan 2023 02:14:45 -0800 Subject: [PATCH] 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. Pull Request resolved: https://github.com/facebook/react-native/pull/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 --- Libraries/Alert/Alert.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/Alert/Alert.d.ts b/Libraries/Alert/Alert.d.ts index 6fdd18ad8ec78c..788f1f5ae72e42 100644 --- a/Libraries/Alert/Alert.d.ts +++ b/Libraries/Alert/Alert.d.ts @@ -77,6 +77,7 @@ export interface AlertStatic { type?: AlertType, defaultValue?: string, keyboardType?: string, + options?: AlertOptions, ) => void; }