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:
@@ -16,15 +16,17 @@ import EventType from '../events/EventType.js';
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Implements a Least-Recently-Used cache where the keys do not conflict with
|
||||
* Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring
|
||||
* items from the cache is the responsibility of the user.
|
||||
*
|
||||
* @fires module:ol/events/Event~Event
|
||||
* @template T
|
||||
*/
|
||||
class LRUCache extends EventTarget {
|
||||
|
||||
/**
|
||||
* Implements a Least-Recently-Used cache where the keys do not conflict with
|
||||
* Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring
|
||||
* items from the cache is the responsibility of the user.
|
||||
*
|
||||
* @fires module:ol/events/Event~Event
|
||||
* @template T
|
||||
* @param {number=} opt_highWaterMark High water mark.
|
||||
*/
|
||||
constructor(opt_highWaterMark) {
|
||||
|
||||
Reference in New Issue
Block a user