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 { IIdleTimerProps } from 'react-idle-timer'
Docs Source

IIdleTimer#

This is the interface that IdleTimer exports. It consists of the methods that can be called after instantiating an IdleTimer instance.

import { IIdleTimer } from 'react-idle-timer'

EventsType#

The events type contains all the valid DOM Event values that can be passed to events and immediateEvents.

import { EventsType } from 'react-idle-timer'

MessageType#

The type for messages sent through the message() method.

Made withby Randy Lebeau