Skip to content

Commit c971073

Browse files
committed
Fix template tag syntax
In 2.9 and earlier, Typescript allowed braces around the name introduced by the `@template` tag, even though this syntax is non-standard. In 3.0, Typescript introduces a more complex `@template` syntax that uses braces for specifying the constraint of a type parameter: ```js /** @template {Constraint} T -- By analogy with param syntax: * @param {T} name */ function f(name) { ... } ``` That means that the syntax `/** @template {T} */` is illegal. This PR fixes the uses of the `@template` tag ahead of Typescript 3.0 as well as typescript@next.
1 parent 19389b7 commit c971073

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/Chunk.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const getModulesIdent = set => {
6969
};
7070

7171
/**
72-
* @template {T}
72+
* @template T
7373
* @param {Set<T>} set the set to convert to array
7474
* @returns {Array<T>} the array returned from Array.from(set)
7575
*/

lib/ChunkGroup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const compareLocations = require("./compareLocations");
1818
let debugId = 5000;
1919

2020
/**
21-
* @template {T}
21+
* @template T
2222
* @param {Set<T>} set set to convert to array.
2323
* @returns {T[]} the array format of existing set
2424
*/

0 commit comments

Comments
 (0)