mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +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
45 lines
989 B
TypeScript
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;
|