Skip to content

Commit 9dac81d

Browse files
Add a method to reset the reflection id
1 parent 19fdf2f commit 9dac81d

File tree

5 files changed

+26
-1
lines changed

5 files changed

+26
-1
lines changed

bin/typedoc.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,12 @@ declare module td {
10421042
* while creating the final output.
10431043
*/
10441044
declare module td {
1045+
/**
1046+
* Reset the reflection id.
1047+
*
1048+
* Used by the test cases to ensure the reflection ids won't change between runs.
1049+
*/
1050+
function resetReflectionID(): void;
10451051
/**
10461052
* Defines the available reflection kinds.
10471053
*/

bin/typedoc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3409,6 +3409,15 @@ var td;
34093409
* Current reflection id.
34103410
*/
34113411
var REFLECTION_ID = 0;
3412+
/**
3413+
* Reset the reflection id.
3414+
*
3415+
* Used by the test cases to ensure the reflection ids won't change between runs.
3416+
*/
3417+
function resetReflectionID() {
3418+
REFLECTION_ID = 0;
3419+
}
3420+
td.resetReflectionID = resetReflectionID;
34123421
/**
34133422
* Defines the available reflection kinds.
34143423
*/

gruntfile.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ module.exports = function(grunt)
7878

7979
settings.inputFiles = [path];
8080
settings.expandInputFiles();
81+
TD.resetReflectionID();
82+
8183
var result = converter.convert(settings.inputFiles, settings);
8284
var data = JSON.stringify(result.project.toObject(), null, ' ');
8385
data = data.split(TD.normalizePath(base)).join('%BASE%');

src/td/converter/Converter.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ module td
7676
var inherited:string[] = [];
7777
var typeParameters:{[name:string]:Type} = {};
7878

79-
8079
return compile();
8180

8281

src/td/models/Reflection.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ module td
1616
*/
1717
var REFLECTION_ID:number = 0;
1818

19+
/**
20+
* Reset the reflection id.
21+
*
22+
* Used by the test cases to ensure the reflection ids won't change between runs.
23+
*/
24+
export function resetReflectionID() {
25+
REFLECTION_ID = 0;
26+
}
27+
1928
/**
2029
* Defines the available reflection kinds.
2130
*/

0 commit comments

Comments
 (0)