You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-11 17:57:29 +03:00
Update typescript-eslint plugin & parser (#7351)
This commit is contained in:
committed by
GitHub
parent
0bb7f3d3ee
commit
132e19beb7
@@ -24,6 +24,7 @@ type Mapper<T> = (roomState: RoomState) => T;
|
||||
const defaultMapper: Mapper<RoomState> = (roomState: RoomState) => roomState;
|
||||
|
||||
// Hook to simplify watching Matrix Room state
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
|
||||
export const useRoomState = <T extends any = RoomState>(
|
||||
room?: Room,
|
||||
mapper: Mapper<T> = defaultMapper as Mapper<T>,
|
||||
|
||||
Reference in New Issue
Block a user