Update typescript-eslint plugin & parser (#7351)
This commit is contained in:
parent
0bb7f3d3ee
commit
132e19beb7
5 changed files with 63 additions and 56 deletions
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||
|
||||
import { useState } from "react";
|
||||
|
||||
export const useLocalEcho = <T extends any>(
|
||||
export const useLocalEcho = <T>(
|
||||
currentFactory: () => T,
|
||||
setterFn: (value: T) => Promise<unknown>,
|
||||
errorFn: (error: Error) => void,
|
||||
|
|
|
@ -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>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue