mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
Removed explicit event declarations (because handled by the Events class). Updated optionality of various interfaces. Corrected typo on LocationRect.
This commit is contained in:
+1
-14
@@ -9,7 +9,7 @@ declare module Microsoft.Maps.AdvancedShapes {
|
||||
|
||||
export class EntityCollection {
|
||||
|
||||
constructor(options: EntityCollectionOptions);
|
||||
constructor(options?: EntityCollectionOptions);
|
||||
|
||||
clear(): void;
|
||||
get(index: number): Entity;
|
||||
@@ -24,10 +24,6 @@ declare module Microsoft.Maps.AdvancedShapes {
|
||||
removeAt(index: number): Entity;
|
||||
setOptions(options: EntityCollectionOptions): void;
|
||||
toString(): string;
|
||||
|
||||
entityAdded: (args: EntityChangeArgs) => any;
|
||||
entityChanged: (args: EntityChangeArgs) => any;
|
||||
entityRemoved: (args: EntityChangeArgs) => any;
|
||||
}
|
||||
|
||||
export class Polygon implements Entity {
|
||||
@@ -43,15 +39,6 @@ declare module Microsoft.Maps.AdvancedShapes {
|
||||
setLocations(locations: Location[]): void;
|
||||
setOptions(options: PolylineOptions): void;
|
||||
toString(): string;
|
||||
|
||||
click: (eventArgs: MouseEventArgs) => void;
|
||||
dbclick: (eventArgs: MouseEventArgs) => void;
|
||||
entitychanged: (entity: Entity) => void;
|
||||
mousedown: (eventArgs: MouseEventArgs) => void;
|
||||
mouseout: (eventArgs: MouseEventArgs) => void;
|
||||
mouseover: (eventArgs: MouseEventArgs) => void;
|
||||
mouseup: (eventArgs: MouseEventArgs) => void;
|
||||
rightclick: (eventArgs: MouseEventArgs) => void;
|
||||
}
|
||||
|
||||
}
|
||||
-25
@@ -79,10 +79,6 @@ declare module Microsoft.Maps.Directions {
|
||||
isExactLocation(): boolean;
|
||||
isViapoint(): boolean;
|
||||
setOptions(options: WaypointOptions): void;
|
||||
|
||||
changed: (args: WaypointEventArgs) => void;
|
||||
geocoded: (args: WaypointEventArgs) => void;
|
||||
reverseGeocoded: (args: WaypointEventArgs) => void;
|
||||
}
|
||||
|
||||
export interface DirectionsRenderOptions {
|
||||
@@ -185,27 +181,6 @@ declare module Microsoft.Maps.Directions {
|
||||
setMapView(): void;
|
||||
setRenderOptions(options: DirectionsRenderOptions): void;
|
||||
setRequestOptions(options: DirectionsRequestOptions): void;
|
||||
|
||||
afterRouteSelectorRender: (args: RouteSelectorRenderEventArgs) => void;
|
||||
afterStepRender: (args: DirectionsStepRenderEventArgs) => void;
|
||||
afterSummaryRender: (args: RouteSummaryRenderEventArgs) => void;
|
||||
afterWaypointRender: (args: WaypointRenderEventArgs) => void;
|
||||
beforeDisambiguationRender: (args: DisambiguationRenderEventArgs) => void;
|
||||
beforeRouteSelectorRender: (args: RouteSelectorRenderEventArgs) => void;
|
||||
beforeStepRender: (args: DirectionsStepRenderEventArgs) => void;
|
||||
beforeSummaryRender: (args: RouteSummaryRenderEventArgs) => void;
|
||||
beforeWaypointRender: (args: WaypointRenderEventArgs) => void;
|
||||
directionsError: (args: DirectionsErrorEventArgs) => void;
|
||||
directionsUpdated: (args: DirectionsEventArgs) => void;
|
||||
dragDropCompleted: () => void;
|
||||
itineraryStepClicked: (args: DirectionsStepEventArgs) => void;
|
||||
mouseEnterRouteSelector: (args: RouteSelectorEventArgs) => void;
|
||||
mouseEnterStep: (args: DirectionsStepEventArgs) => void;
|
||||
mouseLeaveRouteSelector: (args: RouteSelectorEventArgs) => void;
|
||||
mouseLeaveStep: (args: DirectionsStepEventArgs) => void;
|
||||
routeSelectorClicked: (args: RouteSelectorEventArgs) => void;
|
||||
waypointAdded: (args: WaypointEventArgs) => void;
|
||||
waypointRemoved: (args: WaypointEventArgs) => void;
|
||||
}
|
||||
|
||||
export interface DirectionsStepEventArgs {
|
||||
|
||||
Vendored
+22
-22
@@ -6,7 +6,7 @@
|
||||
/// <reference path="Microsoft.Maps.d.ts"/>
|
||||
|
||||
declare module Microsoft.Maps.Search {
|
||||
|
||||
|
||||
export interface Address {
|
||||
addressLine: string;
|
||||
adminDistrict: string;
|
||||
@@ -25,12 +25,12 @@ declare module Microsoft.Maps.Search {
|
||||
}
|
||||
|
||||
export interface GeocodeRequestOptions {
|
||||
bounds: LocationRect;
|
||||
callback: (result: GeocodeResult, userData: any) => any;
|
||||
bounds?: LocationRect;
|
||||
callback?: (result: GeocodeResult, userData: any) => any;
|
||||
count: number;
|
||||
errorCallback: (options: GeocodeRequestOptions) => any;
|
||||
timeout: number;
|
||||
userData: any;
|
||||
errorCallback?: (options: GeocodeRequestOptions) => any;
|
||||
timeout?: number;
|
||||
userData?: any;
|
||||
where:string;
|
||||
}
|
||||
|
||||
@@ -71,15 +71,15 @@ declare module Microsoft.Maps.Search {
|
||||
}
|
||||
|
||||
export interface ReverseGeocodeRequestOptions {
|
||||
callback: (result: PlaceResult, userData: any) => any;
|
||||
errorCallback: (options: ReverseGeocodeRequestOptions) => any;
|
||||
location: Location;
|
||||
timeout: number;
|
||||
userData:any;
|
||||
callback?: (result: PlaceResult, userData: any) => any;
|
||||
errorCallback?: (options: ReverseGeocodeRequestOptions) => any;
|
||||
location?: Location;
|
||||
timeout?: number;
|
||||
userData?:any;
|
||||
}
|
||||
|
||||
export class SearchManager {
|
||||
|
||||
|
||||
constructor(map: Map);
|
||||
|
||||
geocode(request: GeocodeRequestOptions): void;
|
||||
@@ -104,16 +104,16 @@ declare module Microsoft.Maps.Search {
|
||||
}
|
||||
|
||||
export interface SearchRequestOptions {
|
||||
callback:(result: SearchResponse, userData: any)=>any;
|
||||
callback?:(result: SearchResponse, userData: any)=>any;
|
||||
count: number;
|
||||
errorCallback:(options: SearchRequestOptions)=>any;
|
||||
query: string;
|
||||
startIndex: number;
|
||||
timeout: number;
|
||||
entityType: string;
|
||||
userData: any;
|
||||
what: string;
|
||||
where:string;
|
||||
errorCallback?:(options: SearchRequestOptions)=>any;
|
||||
query?: string;
|
||||
startIndex?: number;
|
||||
timeout?: number;
|
||||
entityType?: string;
|
||||
userData?: any;
|
||||
what?: string;
|
||||
where?:string;
|
||||
}
|
||||
|
||||
export interface SearchResponse {
|
||||
@@ -149,4 +149,4 @@ declare module Microsoft.Maps.Search {
|
||||
website:string;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+15
-18
@@ -11,20 +11,23 @@ declare module Microsoft.Maps.VenueMaps {
|
||||
eventArgs: MouseEventArgs;
|
||||
}
|
||||
|
||||
export interface PrimitiveResponse {
|
||||
eventArgs: Primitive;
|
||||
}
|
||||
|
||||
export interface Directory {
|
||||
|
||||
addToDOM(div: HTMLElement, sortOrder: DirectorySortOrder, to_group_or_not: DirectoryGrouping): void;
|
||||
createUIElements(): void;
|
||||
handleMouseClick(response: MouseResponse): void;
|
||||
handleMouseOut(response: MouseResponse): void;
|
||||
handleMouseOver(response: MouseResponse): void;
|
||||
handleMouseClick(e: (response: MouseResponse) => void): void;
|
||||
handleMouseClick(e: (response: PrimitiveResponse) => void): void;
|
||||
handleMouseOut(e: (response: MouseResponse) => void): void;
|
||||
handleMouseOut(e: (response: PrimitiveResponse) => void): void;
|
||||
handleMouseOver(e: (response: MouseResponse) => void): void;
|
||||
handleMouseOver(e: (response: PrimitiveResponse) => void): void;
|
||||
isInDOM(): boolean;
|
||||
removeFromDOM(): void;
|
||||
setHeight(height: number): void;
|
||||
|
||||
click: (eventArgs: MouseEventArgs) => any;
|
||||
mouseOut: (eventArgs: MouseEventArgs) => any;
|
||||
mouseOver: (eventArgs: MouseEventArgs) => any;
|
||||
}
|
||||
|
||||
export enum DirectoryGrouping {
|
||||
@@ -67,10 +70,10 @@ declare module Microsoft.Maps.VenueMaps {
|
||||
}
|
||||
|
||||
export interface NearbyVenueOptions {
|
||||
callback: (maps: Array<VenueMap>) => any;
|
||||
location: Location;
|
||||
map: Map;
|
||||
radius: number;
|
||||
callback?: (maps: Array<VenueMap>) => any;
|
||||
location?: Location;
|
||||
map?: Map;
|
||||
radius?: number;
|
||||
}
|
||||
|
||||
export interface Polygon {
|
||||
@@ -116,12 +119,6 @@ declare module Microsoft.Maps.VenueMaps {
|
||||
hide(): void;
|
||||
setActiveFloor(floor: string): void;
|
||||
show(): void;
|
||||
|
||||
click: (eventArgs: Primitive) => any;
|
||||
close: () => any;
|
||||
footprintclick: (eventArgs: Primitive) => any;
|
||||
mouseout: (eventArgs: Primitive) => any;
|
||||
mouseover: (eventArgs: Primitive) => any;
|
||||
}
|
||||
|
||||
export interface VenueMapCreationOptions {
|
||||
@@ -138,4 +135,4 @@ declare module Microsoft.Maps.VenueMaps {
|
||||
getNearbyVenues(options: NearbyVenueOptions): void;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+35
-74
@@ -45,7 +45,7 @@ declare module Microsoft.Maps {
|
||||
getNorth(): number;
|
||||
getNorthwest(): Location;
|
||||
getSouth(): number;
|
||||
getSouthEast(): Location;
|
||||
getSoutheast(): Location;
|
||||
getWest(): number;
|
||||
intersects(rect: LocationRect): boolean;
|
||||
toString(): string;
|
||||
@@ -96,7 +96,8 @@ declare module Microsoft.Maps {
|
||||
|
||||
export class Map {
|
||||
|
||||
constructor(containerElement: HTMLElement, options: MapOptions);
|
||||
constructor(containerElement: HTMLElement, options?: MapOptions);
|
||||
constructor(containerElement: HTMLElement, options?: ViewOptions);
|
||||
|
||||
entities: EntityCollection;
|
||||
|
||||
@@ -137,39 +138,25 @@ declare module Microsoft.Maps {
|
||||
setMapType(mapTypeId: MapTypeId): void;
|
||||
setOptions(options: MapOptions): void;
|
||||
setView(options: ViewOptions): void;
|
||||
tryLocationToPixel(locations: Array<Location>, reference?: PixelReference): any;
|
||||
tryPixelToLocation(points: Array<Point>, reference?: PixelReference): any;
|
||||
|
||||
click: (eventArgs: MouseEventArgs) => void;
|
||||
copyrightchanged: () => void;
|
||||
dblclick: (eventArgs: MouseEventArgs) => void;
|
||||
imagerychanged: () => void;
|
||||
keydown: (eventArgs: KeyEventArgs) => void;
|
||||
keypress: (eventArgs: KeyEventArgs) => void;
|
||||
keyup: (eventArgs: KeyEventArgs) => void;
|
||||
maptypechanged: () => void;
|
||||
mousedown: (eventArgs: MouseEventArgs) => void;
|
||||
mousemove: (eventArgs: MouseEventArgs) => void;
|
||||
mouseout: (eventArgs: MouseEventArgs) => void;
|
||||
mouseover: (eventArgs: MouseEventArgs) => void;
|
||||
mouseup: (eventArgs: MouseEventArgs) => void;
|
||||
mousewheel: (eventArgs: MouseEventArgs) => void;
|
||||
rightlick: (eventArgs: MouseEventArgs) => void;
|
||||
targetviewchanged: () => void;
|
||||
tiledownloadcomplete: () => void;
|
||||
viewchange: () => void;
|
||||
viewchangeend: () => void;
|
||||
viewchangestart: () => void;
|
||||
tryLocationToPixel(locations: Location, reference?: PixelReference): Point;
|
||||
tryLocationToPixel(locations: Array<Location>, reference?: PixelReference): Array<Point>;
|
||||
tryPixelToLocation(points: Point, reference?: PixelReference): Location;
|
||||
tryPixelToLocation(points: Array<Point>, reference?: PixelReference): Array<Location>;
|
||||
}
|
||||
|
||||
export class MapMode {
|
||||
|
||||
getDrawShapesInSingleLayer(): boolean;
|
||||
getShouldClipPolygons(): boolean;
|
||||
setOptions(options: MapOptions): void;
|
||||
setOptions(options: MapModeOptions): void;
|
||||
setViewChangeEndDelay(delay: number): void;
|
||||
}
|
||||
|
||||
export interface MapModeOptions {
|
||||
shouldClipPolygons?: boolean;
|
||||
drawShapesInSingleLayer?:boolean;
|
||||
}
|
||||
|
||||
export interface MapOptions {
|
||||
|
||||
backgroundColor?: Color;
|
||||
@@ -272,14 +259,14 @@ declare module Microsoft.Maps {
|
||||
}
|
||||
|
||||
export interface EntityCollectionOptions {
|
||||
bubble: boolean;
|
||||
visible: boolean;
|
||||
zIndex: number;
|
||||
bubble?: boolean;
|
||||
visible?: boolean;
|
||||
zIndex?: number;
|
||||
}
|
||||
|
||||
export class EntityCollection {
|
||||
|
||||
constructor(options: EntityCollectionOptions);
|
||||
constructor(options?: EntityCollectionOptions);
|
||||
|
||||
clear(): void;
|
||||
get(index: number): Entity;
|
||||
@@ -295,9 +282,6 @@ declare module Microsoft.Maps {
|
||||
setOptions(options: EntityCollectionOptions): void;
|
||||
toString(): string;
|
||||
|
||||
entityAdded: (args: EntityChangeArgs) => any;
|
||||
entityChanged: (args: EntityChangeArgs) => any;
|
||||
entityRemoved: (args: EntityChangeArgs) => any;
|
||||
}
|
||||
|
||||
export class Infobox {
|
||||
@@ -325,11 +309,6 @@ declare module Microsoft.Maps {
|
||||
setLocation(location: Location): void;
|
||||
setOptions(options: InfoboxOptions): void;
|
||||
toString(): string;
|
||||
|
||||
click: (eventArgs: MouseEventArgs) => void;
|
||||
entitychanged: (entity: Entity) => void;
|
||||
mouseenter: (eventArgs: MouseEventArgs) => void;
|
||||
mouseleave: (eventArgs: MouseEventArgs) => void;
|
||||
}
|
||||
|
||||
export interface Action {
|
||||
@@ -378,15 +357,11 @@ declare module Microsoft.Maps {
|
||||
setLocations(locations: Array<Location>): void;
|
||||
setOptions(options: PolylineOptions): void;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
click: (eventArgs: MouseEventArgs) => void;
|
||||
dblclick: (eventArgs: MouseEventArgs) => void;
|
||||
entitychanged: (entity: Entity) => void;
|
||||
mousedown: (eventArgs: MouseEventArgs) => void;
|
||||
mouseout: (eventArgs: MouseEventArgs) => void;
|
||||
mouseover: (eventArgs: MouseEventArgs) => void;
|
||||
mouseup: (eventArgs: MouseEventArgs) => void;
|
||||
rightclick: (eventArgs: MouseEventArgs) => void;
|
||||
export class Position {
|
||||
coords: Coordinates;
|
||||
timestamp: string;
|
||||
}
|
||||
|
||||
export interface PolylineOptions {
|
||||
@@ -409,20 +384,11 @@ declare module Microsoft.Maps {
|
||||
setLocations(locations: Location[]): void;
|
||||
setOptions(options: PolylineOptions): void;
|
||||
toString(): string;
|
||||
|
||||
click: (eventArgs: MouseEventArgs) => void;
|
||||
dbclick: (eventArgs: MouseEventArgs) => void;
|
||||
entitychanged: (entity: Entity) => void;
|
||||
mousedown: (eventArgs: MouseEventArgs) => void;
|
||||
mouseout: (eventArgs: MouseEventArgs) => void;
|
||||
mouseover: (eventArgs: MouseEventArgs) => void;
|
||||
mouseup: (eventArgs: MouseEventArgs) => void;
|
||||
rightclick: (eventArgs: MouseEventArgs) => void;
|
||||
}
|
||||
|
||||
export interface PolygonOptions {
|
||||
fillColor?: Color;
|
||||
infoBox?: Infobox;
|
||||
infobox?: Infobox;
|
||||
strokeColor?: Color;
|
||||
strokeDashArray?: string;
|
||||
strokeThickness?: number;
|
||||
@@ -446,18 +412,6 @@ declare module Microsoft.Maps {
|
||||
setLocation(location: Location): void;
|
||||
setOptions(options: PushpinOptions): void;
|
||||
toString(): string;
|
||||
|
||||
click: (eventArgs: MouseEventArgs) => void;
|
||||
dblclick: (eventArgs: MouseEventArgs) => void;
|
||||
drag: (object: Pushpin) => any;
|
||||
dragend: (eventArgs: MouseEventArgs) => void;
|
||||
dragstart: (eventArgs: MouseEventArgs) => void;
|
||||
entitychanged: (object: { entity: Entity; }) => any;
|
||||
mousedown: (eventArgs: MouseEventArgs) => void;
|
||||
mouseout: (eventArgs: MouseEventArgs) => void;
|
||||
mouseover: (eventArgs: MouseEventArgs) => void;
|
||||
mouseup: (eventArgs: MouseEventArgs) => void;
|
||||
rightclick: (eventArgs: MouseEventArgs) => void;
|
||||
}
|
||||
|
||||
export enum EntityState {
|
||||
@@ -487,13 +441,11 @@ declare module Microsoft.Maps {
|
||||
|
||||
constructor(options: TileLayerOptions);
|
||||
|
||||
getOpacty(): number;
|
||||
getOpacity(): number;
|
||||
getTileSource(projection: string): TileSource;
|
||||
getZIndex(): number;
|
||||
setOptions(options: TileLayerOptions): void;
|
||||
toString(): string;
|
||||
|
||||
tiledownloadcomplete: () => void;
|
||||
}
|
||||
|
||||
export class TileSource {
|
||||
@@ -509,7 +461,7 @@ declare module Microsoft.Maps {
|
||||
export interface TileSourceOptions {
|
||||
|
||||
height?: number;
|
||||
uriConstructor: string;
|
||||
uriConstructor: any;
|
||||
width?: number;
|
||||
}
|
||||
|
||||
@@ -550,9 +502,18 @@ declare module Microsoft.Maps {
|
||||
removeAccuracyCircle(): void;
|
||||
}
|
||||
|
||||
export interface PositionOptionsErrorCallbackResult {
|
||||
internalError: PositionError;
|
||||
errorCode:number;
|
||||
}
|
||||
export interface PositionOptions {
|
||||
enableHighAccuracy?: boolean;
|
||||
errorCallback?:(result:PositionOptionsErrorCallbackResult)=>void;
|
||||
}
|
||||
|
||||
export interface PositionCircleOptions {
|
||||
polygonOptions: PolygonOptions;
|
||||
showOnMap: boolean;
|
||||
showOnMap?: boolean;
|
||||
}
|
||||
|
||||
export class PositionError {
|
||||
@@ -567,7 +528,7 @@ declare module Microsoft.Maps {
|
||||
homeRegion?: string;
|
||||
}
|
||||
|
||||
export function loadModule(moduleKey: string, options: ModuleOptions): void;
|
||||
export function loadModule(moduleKey: string, options?: ModuleOptions): void;
|
||||
export function moduleLoaded(moduleKey: string): void;
|
||||
export function registerModule(moduleKey: string, scriptUrl: string, options?: ModuleOptions): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user