From 24537ce6ebc5ca30181006c74b5f1847d9030906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Fri, 10 May 2013 04:32:53 -0700 Subject: [PATCH] Updated Exports Files (markdown) --- Exports-Files.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Exports-Files.md b/Exports-Files.md index 9756db0..ecb939e 100644 --- a/Exports-Files.md +++ b/Exports-Files.md @@ -32,7 +32,23 @@ All the (exported) constructors are _single-argument constructors_, they take on target: 'map' }); -The constructors' options objects, and their properties, are declared in the `src/objectliterals.jsdoc` file. The options objects themselves are declared using the `@typedef` keyword, while properties are declared using the `@property` keyword. +The constructors' options objects, and their properties, are declared in the `src/objectliterals.jsdoc` file. The options objects themselves are declared using the `@typedef` keyword, while properties are declared using the `@property` keyword. This is, for example, how the `ol.Map` constructor's options are declared: + +``` +/** + * Object literal with config options for the map. + * @typedef {Object} ol.MapOptions + * @property {Array.|undefined} controls Controls initially + * added to the map. + * @property {ol.Collection|undefined} interactions Interactions. + * @property {Array.|ol.Collection|undefined} layers Layers. + * @property {ol.RendererHint|undefined} renderer Renderer. + * @property {Array.|undefined} renderers Renderers. + * @property {Element|string|undefined} target The container for the map. + * @property {ol.IView|undefined} view The map's view. Currently + * {@link ol.View2D} is available as view. + */ +``` This file is also processed with the `bin/generate-exports` script, but using the `--externs` and `--typedef` switches.