mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-02 01:20:07 +00:00
* add algolia places typings * add request changes * fix build errors * fix test errors * remove rules from tslint * remove empty line * add namespace places * remove unused comma * add missing whitespace and remove padding * add test file * add file to tsconfig * comment places func * add tests * uncomment places func * fix events import
32 lines
677 B
TypeScript
32 lines
677 B
TypeScript
import * as places from "places";
|
|
import { EventEmitter } from "events";
|
|
|
|
const options: places.PlacesOptions = {
|
|
appId: 'your app Id',
|
|
apiKey: 'your api key',
|
|
container: '<input type=\"search\" id=\"address\">'
|
|
};
|
|
|
|
const autompleteOptions: places.AutompleteOptions = {
|
|
autoselect: true,
|
|
hint: true,
|
|
cssClasses: {
|
|
root: 'root',
|
|
prefix: 'prefix',
|
|
},
|
|
debug: true,
|
|
};
|
|
|
|
const placesObject: places.Places = {
|
|
rawAnswer: 'raw',
|
|
query: 'query',
|
|
suggestion: 'suggestion',
|
|
suggestionIndex: 'suggestionIndex'
|
|
};
|
|
|
|
const error: places.Error = {
|
|
message: 'message'
|
|
};
|
|
|
|
const algoliaplaces: EventEmitter = places(options);
|