Do not document object literals as interfaces

Instead, object literals with properties that should not be
renamed can go in externs/olx.js.
This commit is contained in:
Andreas Hocevar
2014-05-15 12:10:32 +02:00
parent e050c905e2
commit eb6a938062
21 changed files with 108 additions and 167 deletions
+1 -116
View File
@@ -48,100 +48,6 @@ oli.DrawEvent.prototype.feature;
/** @interface */
oli.FrameState;
/** @type {boolean} */
oli.FrameState.prototype.animate;
/** @type {Object.<string, ol.Attribution>} */
oli.FrameState.prototype.attributions;
/** @type {goog.vec.Mat4.Number} */
oli.FrameState.prototype.coordinateToPixelMatrix;
/** @type {(null|ol.Extent)} */
oli.FrameState.prototype.extent;
/** @type {ol.Coordinate} */
oli.FrameState.prototype.focus;
/** @type {number} */
oli.FrameState.prototype.index;
/** @type {Object.<number, ol.layer.LayerState>} */
oli.FrameState.prototype.layerStates;
/** @type {Array.<ol.layer.LayerState>} */
oli.FrameState.prototype.layerStatesArray;
/** @type {Object.<string, string>} */
oli.FrameState.prototype.logos;
/**
* @type {number}
* @todo api
*/
oli.FrameState.prototype.pixelRatio;
/** @type {goog.vec.Mat4.Number} */
oli.FrameState.prototype.pixelToCoordinateMatrix;
/** @type {Array.<ol.PostRenderFunction>} */
oli.FrameState.prototype.postRenderFunctions;
/** @type {ol.Size} */
oli.FrameState.prototype.size;
/** @type {Object.<string, boolean>} */
oli.FrameState.prototype.skippedFeatureUids_;
/** @type {ol.TileQueue} */
oli.FrameState.prototype.tileQueue;
/**
* @type {number}
* @todo api
*/
oli.FrameState.prototype.time;
/** @type {Object.<string, Object.<string, ol.TileRange>>} */
oli.FrameState.prototype.usedTiles;
/**
* @type {oli.View2DState}
* @todo api
*/
oli.FrameState.prototype.view2DState;
/** @type {Array.<number>} */
oli.FrameState.prototype.viewHints;
/** @type {Object.<string, Object.<string, boolean>>} */
oli.FrameState.prototype.wantedTiles;
/** @interface */
oli.ObjectEvent;
@@ -177,27 +83,6 @@ oli.MapBrowserEvent.prototype.pixel;
/** @interface */
oli.View2DState;
/** @type {ol.Coordinate} */
oli.View2DState.prototype.center;
/** @type {ol.proj.Projection} */
oli.View2DState.prototype.projection;
/** @type {number} */
oli.View2DState.prototype.resolution;
/** @type {number} */
oli.View2DState.prototype.rotation;
/**
* @interface
*/
@@ -251,7 +136,7 @@ oli.render.Event.prototype.context;
/**
* @type {oli.FrameState|undefined}
* @type {olx.FrameState|undefined}
* @todo api
*/
oli.render.Event.prototype.frameState;
+60
View File
@@ -64,6 +64,44 @@ olx.DeviceOrientationOptions;
olx.DeviceOrientationOptions.prototype.tracking;
/**
* @typedef {{animate: boolean,
* attributions: Object.<string, ol.Attribution>,
* coordinateToPixelMatrix: goog.vec.Mat4.Number,
* extent: (null|ol.Extent),
* focus: ol.Coordinate,
* index: number,
* layerStates: Object.<number, ol.layer.LayerState>,
* layerStatesArray: Array.<ol.layer.LayerState>,
* logos: Object.<string, string>,
* pixelRatio: number,
* pixelToCoordinateMatrix: goog.vec.Mat4.Number,
* postRenderFunctions: Array.<ol.PostRenderFunction>,
* size: ol.Size,
* skippedFeatureUids_: Object.<string, boolean>,
* tileQueue: ol.TileQueue,
* time: number,
* usedTiles: Object.<string, Object.<string, ol.TileRange>>,
* view2DState: olx.View2DState,
* viewHints: Array.<number>,
* wantedTiles: Object.<string, Object.<string, boolean>>}}
* @todo api
*/
olx.FrameState;
/** @type {number} */
olx.FrameState.prototype.pixelRatio;
/** @type {number} */
olx.FrameState.prototype.time;
/** @type {olx.View2DState} */
olx.FrameState.prototype.view2DState;
/**
* @typedef {{tracking: (boolean|undefined),
* trackingOptions: (GeolocationPositionOptions|undefined),
@@ -494,6 +532,28 @@ olx.View2DOptions.prototype.zoom;
olx.View2DOptions.prototype.zoomFactor;
/**
* @typedef {{center: ol.Coordinate,
* projection: ol.proj.Projection,
* resolution: number,
* rotation: number}}
* @todo api
*/
olx.View2DState;
/** @type {ol.Coordinate} */
olx.View2DState.prototype.center;
/** @type {number} */
olx.View2DState.prototype.resolution;
/** @type {number} */
olx.View2DState.prototype.rotation;
/**
* @typedef {{resolution: number,
* start: (number|undefined),