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

@@ -15,14 +15,16 @@ import {isEmpty} from '../obj.js';
* @property {Object} [value]
*/
/**
* Wrapper around the RBush by Vladimir Agafonkin.
*
* @see https://github.com/mourner/rbush
* @template T
*/
class RBush {
/**
* Wrapper around the RBush by Vladimir Agafonkin.
*
* @param {number=} opt_maxEntries Max entries.
* @see https://github.com/mourner/rbush
* @template T
*/
constructor(opt_maxEntries) {