yandes types issue

This commit is contained in:
nabijonovdavronbek619@gmail.com
2025-11-08 19:40:02 +05:00
parent 34c81f750f
commit 63a930afae
4 changed files with 98 additions and 65 deletions

39
types/ymaps.d.ts vendored Normal file
View File

@@ -0,0 +1,39 @@
// src/types/ymaps.d.ts
declare namespace ymaps {
interface MapOptions {
center: number[];
zoom: number;
controls?: string[];
}
class Map {
constructor(container: HTMLElement, options: MapOptions);
geoObjects: {
add(obj: any): void;
};
controls: any;
}
interface PlacemarkOptions {
iconColor?: string;
draggable?: boolean;
}
interface PlacemarkProperties {
balloonContent?: string;
}
class Placemark {
constructor(
coords: number[],
properties?: PlacemarkProperties,
options?: PlacemarkOptions
);
}
function ready(callback: () => void): void; // ✅ shu qator qoshildi
}
interface Window {
ymaps: typeof ymaps;
}