Problem
Types are off in most recent version with RN v0.72.6 and TS v5.3.2.
setItem(key: string, value: string): Promise<void>;
removeItem(key: string): Promise<void>;
multiSet?(keyValuePairs: Array<KeyValuePairSet>): Promise<void>;
multiGet?(keys: string[]): Promise<readonly KeyValuePairGet[] | KeyValuePairGet[]>;
multiRemove?(keys: string[]): Promise<void>;
}
export type ErrorBoundaryProps = { error: Error; errorInfo: ErrorInfo; reset: () => void };
export type CommonComponent<P = {}> = (props: P & { children?: ReactNode }) => null | ReactNode;
export type MentionedUser = {
range: Range;
user: SendbirdUser;
};
export type Range = {
start: number;
end: number;
};
Because of the return type above I now get
[UIKit Version]
3.4.0
[Current impact]
I can ignore TS in this instance it but I don’t want to have to.
Hi @Cory_Cunningham
I apologize for the inconvenience. It seems that the behavior may vary slightly depending on the type environment. It will be adjusted to use the standard ComponentType
.
sendbird:main
← sendbird:fix/types
opened 04:47PM - 01 Feb 24 UTC
## Description Of Changes
- Type error fix
<img width="442" alt="image" src=… "https://github.com/sendbird/sendbird-uikit-react-native/assets/26326015/9d584901-7155-4b6d-ba5c-d2b3b58acd6f">
## Types Of Changes
What types of changes does your code introduce to this project?
Put an `x` in the boxes that apply_
- [x] Bugfix
- [ ] New feature
- [ ] Documentation (correction or otherwise)
- [ ] Cosmetics (whitespace, appearance (ex) Prettier)
- [ ] Build configuration
- [ ] Improvement (refactor code)
- [ ] Test
1 Like