File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed
Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change 11import { AddTo } from "../../addToInterface" ;
2- import { SearchCallback } from "../../types" ;
32import { MapInterface } from "../createMap/mapInterface" ;
3+ import { Place } from 'schema-dts' ;
44
5+ export type PlaceObject = Exclude < Place , string | URL > ;
56
7+ export type SearchCallback = ( data : any ) => PlaceObject [ ] ;
68
7- export type SearchLocationListItem = {
8- lat : number ;
9- lng : number ;
10- title : string ;
11- }
9+ export type ListItemClickListener = ( event : PlaceObject ) => void ;
1210
13- export type SearchEventCallback = ( event : any ) => void ;
14- export type ListItemClickListener = ( event : SearchLocationListItem ) => void ;
1511export interface SearchInterface extends SearchUiInterface , SearchApiInterface {
1612}
1713
@@ -26,6 +22,6 @@ export interface SearchUiInterface extends AddTo {
2622export interface SearchApiInterface {
2723 setApiUrl ( url : string ) : this;
2824 setSearchParam ( searchParam : string ) : this;
29- search ( question : string ) : Promise < any > ;
25+ search ( question : string ) : Promise < PlaceObject [ ] > ;
3026 addSearchResponseCallback ( searchEventCallback : SearchCallback ) : this;
3127}
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ export type MapEvent = "click" | "dblclick" | "mousedown" | "mouseup" | "mouseov
44
55export type MapEventCallback = ( event : EventData ) => void ;
66
7- export type SearchCallback = ( data : any ) => any ;
8-
97export type ControlPosition = "topright" | "topleft" | "bottomright" | "bottomleft" ;
108
119export type LatLngObject = {
You can’t perform that action at this time.
0 commit comments