Skip to content

Commit 611ff3e

Browse files
committed
Allow booleans.
1 parent ace1c79 commit 611ff3e

File tree

10 files changed

+15
-15
lines changed

10 files changed

+15
-15
lines changed

react-native/components/createCreatableSelectComponent/createCreatableSelectChildrenComponent/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { ControlStyle } from '../../../types/ControlStyle'
1111
import { createInputComponent } from '../../createInputComponent'
1212
import { Hitbox } from '../../Hitbox'
1313

14-
type Instance<T extends null | number | string> = React.FunctionComponent<{
14+
type Instance<T extends null | boolean | number | string> = React.FunctionComponent<{
1515
readonly options: ReadonlyArray<{
1616
readonly value: T
1717
readonly label: string
@@ -39,7 +39,7 @@ const globalStyles = StyleSheet.create({
3939
})
4040

4141
export const createCreatableSelectChildrenComponent = <
42-
T extends null | number | string
42+
T extends null | boolean | number | string
4343
>(
4444
controlStyle: ControlStyle
4545
): Instance<T> & { readonly creatableSelectChildren: Introspection } => {

react-native/components/createCreatableSelectComponent/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type { CreatableSelectProps } from '../../types/CreatableSelectProps'
1515
* @returns The created React component.
1616
*/
1717
export function createCreatableSelectComponent<
18-
T extends null | number | string
18+
T extends null | boolean | number | string
1919
> (
2020
controlStyle: ControlStyle,
2121
rightIcon: null | SvgIcon

react-native/components/createSearchableMultiSelectComponent/createSearchableMultiSelectChildrenComponent/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { ControlStyle } from '../../../types/ControlStyle'
1111
import { createInputComponent } from '../../createInputComponent'
1212
import { Hitbox } from '../../Hitbox'
1313

14-
type Instance<T extends null | number | string> = React.FunctionComponent<{
14+
type Instance<T extends null | boolean | number | string> = React.FunctionComponent<{
1515
readonly options: ReadonlyArray<{
1616
readonly value: T
1717
readonly label: string
@@ -40,7 +40,7 @@ const globalStyles = StyleSheet.create({
4040
})
4141

4242
export const createSearchableMultiSelectChildrenComponent = <
43-
T extends null | number | string
43+
T extends null | boolean | number | string
4444
>(
4545
controlStyle: ControlStyle
4646
): Instance<T> & { readonly searchableMultiSelectChildren: Introspection } => {

react-native/components/createSearchableMultiSelectComponent/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type { SearchableMultiSelectProps } from '../../types/SearchableMultiSele
1515
* @returns The created React component.
1616
*/
1717
export function createSearchableMultiSelectComponent<
18-
T extends null | number | string
18+
T extends null | boolean | number | string
1919
> (
2020
controlStyle: ControlStyle,
2121
rightIcon: null | SvgIcon

react-native/components/createSearchableSelectComponent/createSearchableSelectChildrenComponent/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { ControlStyle } from '../../../types/ControlStyle'
1111
import { createInputComponent } from '../../createInputComponent'
1212
import { Hitbox } from '../../Hitbox'
1313

14-
type Instance<T extends null | number | string> = React.FunctionComponent<{
14+
type Instance<T extends null | boolean | number | string> = React.FunctionComponent<{
1515
readonly options: ReadonlyArray<{
1616
readonly value: T
1717
readonly label: string
@@ -37,7 +37,7 @@ const globalStyles = StyleSheet.create({
3737
})
3838

3939
export const createSearchableSelectChildrenComponent = <
40-
T extends null | number | string
40+
T extends null | boolean | number | string
4141
>(
4242
controlStyle: ControlStyle
4343
): Instance<T> & { readonly searchableSelectChildren: Introspection } => {

react-native/components/createSearchableSelectComponent/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type { SearchableSelectProps } from '../../types/SearchableSelectProps'
1515
* @returns The created React component.
1616
*/
1717
export function createSearchableSelectComponent<
18-
T extends null | number | string
18+
T extends null | boolean | number | string
1919
> (
2020
controlStyle: ControlStyle,
2121
rightIcon: null | SvgIcon

react-native/components/createSplitButtonComponent/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ const createButtonTextStyleInstance = (
157157
}
158158
}
159159

160-
type Instance<TValue extends null | number | string> = React.FunctionComponent<
160+
type Instance<TValue extends null | boolean | number | string> = React.FunctionComponent<
161161
React.PropsWithChildren<{
162162
/**
163163
* The currently selected value.
@@ -193,7 +193,7 @@ React.PropsWithChildren<{
193193
})>
194194
>
195195

196-
type SegmentInstance<TValue extends null | number | string> =
196+
type SegmentInstance<TValue extends null | boolean | number | string> =
197197
React.FunctionComponent<{
198198
/**
199199
* The value of the segment.
@@ -223,7 +223,7 @@ type SegmentInstance<TValue extends null | number | string> =
223223
*/
224224
export const createSplitButtonComponent = <
225225
TType extends string,
226-
TValue extends null | number | string
226+
TValue extends null | boolean | number | string
227227
>(
228228
splitButtonStyle: SplitButtonStyle<TType>
229229
): Instance<TValue> & {

react-native/types/CreatableSelectProps/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Props to be given to creatable select components.
33
* @template T The value of a listed option.
44
*/
5-
export interface CreatableSelectProps<T extends null | number | string> {
5+
export interface CreatableSelectProps<T extends null | boolean | number | string> {
66
/**
77
* When true, it will not be possible to select an option. It will otherwise
88
* be possible to do so.

react-native/types/CustomTextTableColumn/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
export interface CustomTextTableColumn<
1111
TKey extends string,
12-
TRow extends { readonly [TKeyItem in TKey]: null | number | string },
12+
TRow extends { readonly [TKeyItem in TKey]: null | boolean | number | string },
1313
TContext
1414
> {
1515
/**
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/**
22
* A value within a table which can be used to key a row.
33
*/
4-
export type KeyableTableCell = null | number | string
4+
export type KeyableTableCell = null | boolean | number | string

0 commit comments

Comments
 (0)