title: Typescript passing Function as parameter
body: <p>I'm trying to pass two functions as parameters, in order to customize a layer visualization for a Leaflet map. Apart from the specific case, which may not be relevant here as i'm asking for a more general concept, what i've done is:</p>
  
  <pre><code>Map.createLayer(function onEachFeature(feature, layer) {
    var popupContent = "&lt;p&gt;I started out as a GeoJSON " +
    feature.geometry.type + ", but now I'm a Leaflet vector!&lt;/p&gt;";
  
    if (feature.properties &amp;&amp; feature.properties.popupContent) {
      popupContent += feature.properties.popupContent;
    }
  
    layer.bindPopup(popupContent);
  },
  function pointToLayer(feature, latlng) {
    return L.circleMarker(latlng, {
      radius: 8,
      fillColor: "#ff7800",
      color: "#000",
      weight: 1,
      opacity: 1,
      fillOpacity: 0.8
    })
  });
  </code></pre>
  
  <p>where the method "createLayer" of Map (which wraps a Leaflet Map) does:</p>
  
  <pre><code>public createLayer(popupContent:(feature, layer) =&gt; void, renderPoint:(feature,latlng) =&gt; L.CircleMarker): ICOLayer{
    this.layer = L.geoJSON(this.datasource.get(), {
      style: function(feature) {
        return feature.properties &amp;&amp; feature.properties.style;
      },
      onEachFeature: popupContent,
      pointToLayer: renderPoint
    });
    return this;
  }
  </code></pre>
  
  <p>this doesn't work and i don't know why, but if i pass them as anonymous functions (thus ignoring the input parameters) everything works fine:</p>
  
  <pre><code>public createLayer(popupContent:(feature, layer) =&gt; void, renderPoint:(feature,latlng) =&gt; L.CircleMarker): ICOLayer{
        this.layer = L.geoJSON(this.datasource.get(), {
          style: function(feature) {
            return feature.properties &amp;&amp; feature.properties.style;
          },
          onEachFeature: function onEachFeature(feature, layer) {
              var popupContent = "&lt;p&gt;I started out as a GeoJSON " +
              feature.geometry.type + ", but now I'm a Leaflet vector!&lt;/p&gt;";
              if (feature.properties &amp;&amp; feature.properties.popupContent) {
                popupContent += feature.properties.popupContent;
              }
              layer.bindPopup(popupContent);
          },
          pointToLayer: function pointToLayer(feature, latlng) {
            return L.circleMarker(latlng, {
              radius: 8,
              fillColor: "#ff7800",
              color: "#000",
              weight: 1,
              opacity: 1,
              fillOpacity: 0.8
            })
        }
        });
        return this;
      }
  </code></pre>
  
  <p>I've also tried removing the signature of the functions in input, passing them as mere variables, but it didn't work,
  I am not familiar with javascript/typescript, thus this might be a stupid error. Pardon me in advance.</p>
  
  <p>EDIT: No error message is displayed while executing the first approach</p>