Skip to content

Commit

Permalink
fix ListUtils type (ukrbublik#1131)
Browse files Browse the repository at this point in the history
- add `mapListValues` function
- add `undefined` to return type of `toListValue` since the implementation can return `undefined`
  • Loading branch information
schiller-manuel authored Nov 9, 2024
1 parent 3521158 commit e691234
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/modules/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,9 @@ interface ListUtils {
getListValue(value: string | number, listValues: ListValues): ListItem; // get by value
searchListValue(search: string, listValues: ListValues): ListItem; // search by value and title
listValuesToArray(listValues: ListValues): ListItems; // normalize
toListValue(value: string | number | ListItem, title?: string): ListItem; // create
toListValue(value: string | number | ListItem, title?: string): ListItem | undefined; // create
makeCustomListValue(value: string | number): ListItem; // create
mapListValues<T>(listValues : ListValues, mapFn: (item: ListItem | undefined) => T | null) : T[];
}
interface TreeUtils {
jsToImmutable(value: any): AnyImmutable;
Expand Down

0 comments on commit e691234

Please sign in to comment.