Types
IdleTimer exports its internal types for working in Typescript projects. All the types you will need are outlined below. Examples of how to use them can be found in the hook and higher order component docs.
IIdleTimerProps#
This is the interface of the available properties IdleTimer accepts.
import type { IIdleTimerProps } from 'react-idle-timer'
IIdleTimer#
This is the interface that IdleTimer exports. It consists of the methods that can be called after instantiating an IdleTimer instance.
import type { IIdleTimer } from 'react-idle-timer'
ITimers#
The interface that is accepted by the timers
property.
import type { ITimers } from 'react-idle-timer'
EventsType#
The events type contains all the valid DOM Event values that can be passed to events
and immediateEvents
.
import type { EventsType } from 'react-idle-timer'
MessageType#
The type for messages sent through the message()
method.
PresenceType#
The type for onPresenceChange
state changes.