Improve type annotation in ol.format.GeoJSON
This commit is contained in:
@@ -159,7 +159,7 @@ ol.format.GeoJSON.readPolygonGeometry_ = function(object) {
|
||||
/**
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @private
|
||||
* @return {GeoJSONObject} GeoJSON geometry.
|
||||
* @return {GeoJSONGeometry|GeoJSONGeometryCollection} GeoJSON geometry.
|
||||
*/
|
||||
ol.format.GeoJSON.writeGeometry_ = function(geometry) {
|
||||
var geometryWriter = ol.format.GeoJSON.GEOMETRY_WRITERS_[geometry.getType()];
|
||||
@@ -302,7 +302,7 @@ ol.format.GeoJSON.GEOMETRY_READERS_ = {
|
||||
/**
|
||||
* @const
|
||||
* @private
|
||||
* @type {Object.<string, function(ol.geom.Geometry): GeoJSONObject>}
|
||||
* @type {Object.<string, function(ol.geom.Geometry): (GeoJSONGeometry|GeoJSONGeometryCollection)>}
|
||||
*/
|
||||
ol.format.GeoJSON.GEOMETRY_WRITERS_ = {
|
||||
'Point': ol.format.GeoJSON.writePointGeometry_,
|
||||
@@ -456,7 +456,7 @@ ol.format.GeoJSON.prototype.readProjectionFromObject = function(object) {
|
||||
*
|
||||
* @function
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @return {ArrayBuffer|Node|Object|string} GeoJSON.
|
||||
* @return {GeoJSONFeature} GeoJSON.
|
||||
* @api
|
||||
*/
|
||||
ol.format.GeoJSON.prototype.writeFeature;
|
||||
@@ -492,7 +492,7 @@ ol.format.GeoJSON.prototype.writeFeatureObject = function(feature) {
|
||||
*
|
||||
* @function
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @return {ArrayBuffer|Node|Object|string} GeoJSON.
|
||||
* @return {GeoJSONObject} GeoJSON.
|
||||
* @api
|
||||
*/
|
||||
ol.format.GeoJSON.prototype.writeFeatures;
|
||||
@@ -519,7 +519,7 @@ ol.format.GeoJSON.prototype.writeFeaturesObject = function(features) {
|
||||
*
|
||||
* @function
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @return {ArrayBuffer|Node|Object|string} GeoJSON.
|
||||
* @return {GeoJSONGeometry|GeoJSONGeometryCollection} GeoJSON.
|
||||
* @api
|
||||
*/
|
||||
ol.format.GeoJSON.prototype.writeGeometry;
|
||||
|
||||
Reference in New Issue
Block a user