Javascript Google Maps/TypeScript-不一致地识别Google.Maps.Place

Javascript Google Maps/TypeScript-不一致地识别Google.Maps.Place,javascript,google-maps,typescript,google-maps-api-3,Javascript,Google Maps,Typescript,Google Maps Api 3,我正在尝试在我的应用程序中使用Google的MapAPI。但是,我收到以下编译器错误: [ts] Property 'Place' does not exist on type 'typeof maps'. Did you mean 'places'? 现在,通常我可能会认为我缺少一个类型、依赖项或其他东西;然而奇怪的是,仅在上面几行就正确地重新定义了Place属性 class gMap { latLong: google.maps.LatLng; window: google

我正在尝试在我的应用程序中使用Google的MapAPI。但是,我收到以下编译器错误:

[ts] Property 'Place' does not exist on type 'typeof maps'. Did you mean 'places'?
现在,通常我可能会认为我缺少一个类型、依赖项或其他东西;然而奇怪的是,仅在上面几行就正确地重新定义了Place属性

class gMap {
    latLong: google.maps.LatLng;
    window: google.maps.InfoWindow;
    marker: google.maps.Marker;
    map: google.maps.Map;
    directionsService: google.maps.DirectionsService;
    directionsDisplay: google.maps.DirectionsRenderer;
    placeID: string;
    place: google.maps.Place;

constructor(lat: number, long: number, place: string, info: string, mapEl: Element) {
    this.latLong = new google.maps.LatLng(lat, long);
    this.window = new google.maps.InfoWindow({ content: info });
    this.placeID = place;
    this.place = new google.maps.Place(place);

    this.map = new google.maps.Map(mapEl, {
        center: this.latLong,
        zoom: 15
    });

    this.marker = new google.maps.Marker({ position: this.latLong, map: this.map, });
    this.window.open(this.map, this.marker);

}
第一次使用google.maps.Place:google.maps.Place;作品构造函数this.place=new google.maps.Placeplace中的一个;正在导致错误

如果这是显而易见的,我很抱歉,我对TypeScript和谷歌地图还比较陌生。任何指导都将不胜感激。谢谢。

根据谷歌地图JavaScript API文档,google.maps.Place不是类,它是一个对象:

因此,不能使用新操作符创建实例。您应该将其视为具有属性location、placeId和query的普通JavaScript对象