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.