Updated Exports Files (markdown)
+2
-2
@@ -50,10 +50,10 @@ The constructors' options objects, and their properties, are declared in the `sr
|
||||
*/
|
||||
```
|
||||
|
||||
This file is also processed with the `bin/generate-exports` script, but using the `--externs` and `--typedef` switches.
|
||||
|
||||
[Note: config objects and properties are declared in a specific (separate) file because they may be shared by multiple constructors. For example the `ol.source.Vector` constructor currently takes an `ol.source.SourceOptions` options object, and `ol.source.SourceOptions` is a generic/base type that may be used for other constructors. We may want to change that in the future, and force each constructor to have its own config object type. In this way config objects and properties could be declared in the same file as their corresponding constructors.]
|
||||
|
||||
This file is also processed with the `bin/generate-exports` script, but using the `--externs` and `--typedef` switches.
|
||||
|
||||
The `generate-exports --externs` generates Closure externs from the `@typedef` and `@property` directives. The `build.py` script places these externs in the `build/src/external/externs/types.js` file, which is used as a regular externs file by the Closure compiler (see `buildcfg/ol.json`).
|
||||
|
||||
The `generate-exports --typedef` command generate typedef's for the object literals declared with `@typedef` and `@property`. The `build.py` script places the typedef's in the `build/src/external/src/types.js`, which, like `exports.js`, is used as an input file for the ol.js build (see `buildcfg/ol.json`).
|
||||
|
||||
Reference in New Issue
Block a user