The type of the data object to filter, must be an object.
The keys to include from the data object.
Boolean flag type to determine if properties with null or undefined values should be excluded.
The data object to be filtered.
The array of keys to include in the resulting data object. (Can be empty)
Optional
excludeNullUndefined: TExcludeNullUndefinedFlag to determine if properties with null or undefined values should be excluded.
The filtered data object with only the specified keys included. (TObject)
(BasaltError) - Throws an error if the data is null or undefined. (dataErrorKeys.dataIsNull)
(BasaltError) - Throws an error if the data is not a plain object. (dataErrorKeys.dataMustBeObject)
Filters the provided data by including only the specified keys, with an option to exclude null or undefined values. Uses a generic type parameter to control the return type based on the excludeNullUndefined flag.