报错内容
This expression is not constructable.
Type 'Point' has no construct signatures.
构造函数的类型无法直接引用
class Point {
constructor(lng: number, lat: number);
lng: number;
lat: number;
equals(other: Point): boolean;
}
// 错误写法
declare interface BMapGL {
Point: Point ;
}
// 正确写法
declare interface BMapGL {
Point: { new (lng: number, lat: number): Point };
}