DefinitelyTyped/types/places/index.d.ts
ghizlanelotfi 4bc21cbc73 add algolia places typings (#36242)
* 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
2019-06-21 14:19:32 -07:00

45 lines
989 B
TypeScript

// Type definitions for algolia places 1.16
// Project: https://github.com/algolia/places
// Definitions by: Ghizlane LOTFI <https://github.com/ghizlanelotfi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import { EventEmitter } from 'events';
declare namespace places {
function version(): string;
interface PlacesOptions {
appId: string;
apiKey: string;
container: string | HTMLInputElement | NodeList | Element;
}
interface AutompleteOptions {
autoselect: boolean;
hint: boolean;
cssClasses: {
root: string;
prefix: any;
};
debug: boolean;
}
interface Places {
rawAnswer: any;
query: any;
suggestion: any;
suggestionIndex: any;
}
interface Error {
message: string;
}
}
declare function places(
options: places.PlacesOptions
): EventEmitter;
export = places;