Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
784770e
[WIP] Onboarded to dprint
JoshuaKGoldberg Jul 31, 2023
c0ac60c
Switch to useTabs: true in nested configurations
JoshuaKGoldberg Jul 31, 2023
e0613af
Remove overrides for non-tabs files
JoshuaKGoldberg Jul 31, 2023
6b0bbb1
Switch trailingCommas to onlyMultiline
JoshuaKGoldberg Jul 31, 2023
7afbce5
onlyMultiLine
JoshuaKGoldberg Jul 31, 2023
dd37ed2
Reduce to just TypeScript files
JoshuaKGoldberg Jul 31, 2023
7e7210e
Remove nested dprint.json files
JoshuaKGoldberg Jul 31, 2023
5063543
Added initial sketch of workflows
JoshuaKGoldberg Aug 2, 2023
f4b4c3c
Added documentation and .vscode/settings.json formatting
JoshuaKGoldberg Aug 2, 2023
78a486a
Move non-TS-specific settings to root of dprint.json
JoshuaKGoldberg Aug 2, 2023
04822ea
Also format-and-commit on master pushes
JoshuaKGoldberg Aug 2, 2023
0544423
Workflow fixes: master, and run summary
JoshuaKGoldberg Aug 2, 2023
8575cc9
Added concurrency to format-and-commit.yml
JoshuaKGoldberg Aug 3, 2023
12772a4
Allowed just root-level .vscode/settings.json in root-level .gitignore
JoshuaKGoldberg Aug 3, 2023
f86762f
Added remaining generated packages to excludes
JoshuaKGoldberg Aug 11, 2023
796e225
Remaining feedback: ordering, and comment master push trigger for now
JoshuaKGoldberg Aug 11, 2023
305cb0c
[react-native] ran dprint fmt
JoshuaKGoldberg Aug 11, 2023
7871f3e
Add .vscode/extensions.json too
JoshuaKGoldberg Aug 11, 2023
806888e
Use cache, and TS preferred config name
JoshuaKGoldberg Aug 11, 2023
cf692cc
no ci
JoshuaKGoldberg Aug 11, 2023
758788a
Add microsoft-graph to excludes
JoshuaKGoldberg Aug 11, 2023
d20bb7b
Added .git-blame-ignore-revs
JoshuaKGoldberg Aug 14, 2023
3b6214b
Update .github/workflows/format-and-commit.yml
JoshuaKGoldberg Aug 14, 2023
98687fc
Filled in commiter info
JoshuaKGoldberg Aug 14, 2023
d10491e
Remove quoteStyle setting
JoshuaKGoldberg Aug 25, 2023
97e0d5c
Switch .vscode/settings.json to .vscode/settings.template.json
JoshuaKGoldberg Aug 25, 2023
e7136d5
Add 18d1c4e to .git-blame-ignore-revs
JoshuaKGoldberg Aug 25, 2023
9385443
Remove duplicate lines
JoshuaKGoldberg Aug 29, 2023
f0b6069
Merge branch 'master'
JoshuaKGoldberg Aug 29, 2023
1905618
Revert unrelated formatting changes to README.md
JoshuaKGoldberg Aug 29, 2023
296fb5a
Remove TypeScript-specific overrides
JoshuaKGoldberg Aug 29, 2023
dd09bdc
Merge branch 'dprint-onboarding' into dprint-react-native
JoshuaKGoldberg Aug 29, 2023
8ee8f00
Re-ran dprint fmt
JoshuaKGoldberg Aug 29, 2023
2f836fd
Undo additions from dprint-onboarding
JoshuaKGoldberg Aug 29, 2023
53dd55e
Manually correct ts-expect-error directives
JoshuaKGoldberg Aug 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
104 changes: 52 additions & 52 deletions types/react-native/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
import {ProcessedColorValue} from '../StyleSheet/processColor';
import {ColorValue} from '../StyleSheet/StyleSheet';
import { ProcessedColorValue } from "../StyleSheet/processColor";
import { ColorValue } from "../StyleSheet/StyleSheet";

/**
* @see https://reactnative.dev/docs/actionsheetios#content
*/
export interface ActionSheetIOSOptions {
title?: string | undefined;
options: string[];
cancelButtonIndex?: number | undefined;
destructiveButtonIndex?: number | number[] | undefined | null;
message?: string | undefined;
anchor?: number | undefined;
tintColor?: ColorValue | ProcessedColorValue | undefined;
cancelButtonTintColor?: ColorValue | ProcessedColorValue | undefined;
userInterfaceStyle?: 'light' | 'dark' | undefined;
disabledButtonIndices?: number[] | undefined;
title?: string | undefined;
options: string[];
cancelButtonIndex?: number | undefined;
destructiveButtonIndex?: number | number[] | undefined | null;
message?: string | undefined;
anchor?: number | undefined;
tintColor?: ColorValue | ProcessedColorValue | undefined;
cancelButtonTintColor?: ColorValue | ProcessedColorValue | undefined;
userInterfaceStyle?: "light" | "dark" | undefined;
disabledButtonIndices?: number[] | undefined;
}

export interface ShareActionSheetIOSOptions {
message?: string | undefined;
url?: string | undefined;
subject?: string | undefined;
anchor?: number | undefined;
/** The activities to exclude from the ActionSheet.
* For example: ['com.apple.UIKit.activity.PostToTwitter']
*/
excludedActivityTypes?: string[] | undefined;
message?: string | undefined;
url?: string | undefined;
subject?: string | undefined;
anchor?: number | undefined;
/** The activities to exclude from the ActionSheet.
* For example: ['com.apple.UIKit.activity.PostToTwitter']
*/
excludedActivityTypes?: string[] | undefined;
}

/**
* @see https://reactnative.dev/docs/actionsheetios#content
*/
export interface ActionSheetIOSStatic {
/**
* Display an iOS action sheet. The `options` object must contain one or more
* of:
* - `options` (array of strings) - a list of button titles (required)
* - `cancelButtonIndex` (int) - index of cancel button in `options`
* - `destructiveButtonIndex` (int) - index of destructive button in `options`
* - `title` (string) - a title to show above the action sheet
* - `message` (string) - a message to show below the title
*/
showActionSheetWithOptions: (
options: ActionSheetIOSOptions,
callback: (buttonIndex: number) => void,
) => void;
/**
* Display an iOS action sheet. The `options` object must contain one or more
* of:
* - `options` (array of strings) - a list of button titles (required)
* - `cancelButtonIndex` (int) - index of cancel button in `options`
* - `destructiveButtonIndex` (int) - index of destructive button in `options`
* - `title` (string) - a title to show above the action sheet
* - `message` (string) - a message to show below the title
*/
showActionSheetWithOptions: (
options: ActionSheetIOSOptions,
callback: (buttonIndex: number) => void,
) => void;

/**
* Display the iOS share sheet. The `options` object should contain
* one or both of `message` and `url` and can additionally have
* a `subject` or `excludedActivityTypes`:
*
* - `url` (string) - a URL to share
* - `message` (string) - a message to share
* - `subject` (string) - a subject for the message
* - `excludedActivityTypes` (array) - the activities to exclude from the ActionSheet
*
* NOTE: if `url` points to a local file, or is a base64-encoded
* uri, the file it points to will be loaded and shared directly.
* In this way, you can share images, videos, PDF files, etc.
*/
showShareActionSheetWithOptions: (
options: ShareActionSheetIOSOptions,
failureCallback: (error: Error) => void,
successCallback: (success: boolean, method: string) => void,
) => void;
/**
* Display the iOS share sheet. The `options` object should contain
* one or both of `message` and `url` and can additionally have
* a `subject` or `excludedActivityTypes`:
*
* - `url` (string) - a URL to share
* - `message` (string) - a message to share
* - `subject` (string) - a subject for the message
* - `excludedActivityTypes` (array) - the activities to exclude from the ActionSheet
*
* NOTE: if `url` points to a local file, or is a base64-encoded
* uri, the file it points to will be loaded and shared directly.
* In this way, you can share images, videos, PDF files, etc.
*/
showShareActionSheetWithOptions: (
options: ShareActionSheetIOSOptions,
failureCallback: (error: Error) => void,
successCallback: (success: boolean, method: string) => void,
) => void;
}

export const ActionSheetIOS: ActionSheetIOSStatic;
Expand Down
56 changes: 28 additions & 28 deletions types/react-native/Libraries/Alert/Alert.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
* @see https://reactnative.dev/docs/alert#content
*/
export interface AlertButton {
text?: string | undefined;
onPress?: ((value?: string) => void) | undefined;
isPreferred?: boolean | undefined;
style?: 'default' | 'cancel' | 'destructive' | undefined;
text?: string | undefined;
onPress?: ((value?: string) => void) | undefined;
isPreferred?: boolean | undefined;
style?: "default" | "cancel" | "destructive" | undefined;
}

interface AlertOptions {
/** @platform android */
cancelable?: boolean | undefined;
userInterfaceStyle?: 'unspecified' | 'light' | 'dark' | undefined;
/** @platform android */
onDismiss?: (() => void) | undefined;
/** @platform android */
cancelable?: boolean | undefined;
userInterfaceStyle?: "unspecified" | "light" | "dark" | undefined;
/** @platform android */
onDismiss?: (() => void) | undefined;
}

/**
Expand Down Expand Up @@ -55,28 +55,28 @@ interface AlertOptions {
* ```
*/
export interface AlertStatic {
alert: (
title: string,
message?: string,
buttons?: AlertButton[],
options?: AlertOptions,
) => void;
prompt: (
title: string,
message?: string,
callbackOrButtons?: ((text: string) => void) | AlertButton[],
type?: AlertType,
defaultValue?: string,
keyboardType?: string,
options?: AlertOptions,
) => void;
alert: (
title: string,
message?: string,
buttons?: AlertButton[],
options?: AlertOptions,
) => void;
prompt: (
title: string,
message?: string,
callbackOrButtons?: ((text: string) => void) | AlertButton[],
type?: AlertType,
defaultValue?: string,
keyboardType?: string,
options?: AlertOptions,
) => void;
}

export type AlertType =
| 'default'
| 'plain-text'
| 'secure-text'
| 'login-password';
| "default"
| "plain-text"
| "secure-text"
| "login-password";

export const Alert: AlertStatic;
export type Alert = AlertStatic;
Loading