Interface PrefetchOptions

Prefetched data is fetched and processed on initialization. If the browser supports localStorage, the processed data will be cached there to prevent additional network requests on subsequent page loads.

Index

Properties

Properties

optional public filter?: (parsedResponse: any) => Twitter.Typeahead.Datum[]

A function that transforms the response body into an array of datums.

param

Response body

optional public ttl?: number

The time (in milliseconds) the prefetched data should be cached in localStorage. Defaults to 86400000 (1 day).

public url: string

A URL to a JSON file containing an array of datums. Required.