Write tests for the generic properties

This commit is contained in:
Arne Schubert
2017-11-02 13:34:16 +01:00
parent b4d0aa4d5f
commit a8df641bc3

View File

@@ -484,3 +484,15 @@ L.Util.requestAnimFrame(() => {}, {});
L.Util.requestAnimFrame(() => {}, {}, true);
L.Util.cancelAnimFrame(1);
L.Util.emptyImageUrl;
interface MyProperties {
testProperty: string;
}
(L.polygon(latLngs) as L.Polygon<MyProperties>).feature.properties.testProperty = "test";
(L.marker([1, 2], {
icon: L.icon({
iconUrl: 'my-icon.png'
})
}) as L.Marker<MyProperties>).feature.properties.testProperty = "test";