Move template type at the class level

This removes the TS1092 error from TypeScript: Type parameters cannot appear on a constructor declaration.
This commit is contained in:
Frederic Junod
2018-07-19 08:36:54 +02:00
parent 8f7b52f266
commit c1ffb0a2a9
4 changed files with 27 additions and 20 deletions

View File

@@ -56,6 +56,7 @@ export class CollectionEvent extends Event {
* Collection; they trigger events on the appropriate object, not on the
* Collection as a whole.
*
* @template T
* @api
*/
class Collection extends BaseObject {
@@ -63,7 +64,6 @@ class Collection extends BaseObject {
/**
* @param {Array.<T>=} opt_array Array.
* @param {module:ol/Collection~Options=} opt_options Collection options.
* @template T
*/
constructor(opt_array, opt_options) {