Skip to content

Commit 5251f06

Browse files
author
Dave Bartolomeo
committed
Add comment about QueryOutputDir as a base class of QueryEvaluationInfo
1 parent 1acf312 commit 5251f06

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

extensions/ql-vscode/src/run-queries-shared.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ export class QueryOutputDir {
124124
}
125125

126126
export class QueryEvaluationInfo extends QueryOutputDir {
127+
// We extend `QueryOutputDir`, rather than having it as a property, because we need
128+
// `QueryOutputDir`'s `querySaveDir` property to be a property of `QueryEvaluationInfo`. This is
129+
// because `QueryEvaluationInfo` is serialized directly as JSON, and before we hoisted
130+
// `QueryOutputDir` out into a base class, `querySaveDir` was a property on `QueryEvaluationInfo`
131+
// itself.
132+
127133
/**
128134
* Note that in the {@link readQueryHistoryFromFile} method, we create a QueryEvaluationInfo instance
129135
* by explicitly setting the prototype in order to avoid calling this constructor.

0 commit comments

Comments
 (0)