Skip to content

Commit 3be9ace

Browse files
authored
Merge pull request #35 from hed-standard/explicit-override
Add explicit override tags
2 parents aa52187 + 5fae3ab commit 3be9ace

6 files changed

Lines changed: 11 additions & 14 deletions

File tree

src/bids/types/json.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class BidsSidecar extends BidsJsonFile {
121121
*
122122
* @returns {boolean}
123123
*/
124-
public get hasHedData(): boolean {
124+
public override get hasHedData(): boolean {
125125
return this.sidecarKeys.size > 0
126126
}
127127

src/bids/types/tsv.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class BidsTsvFile extends BidsFile {
9494
*
9595
* @returns Whether this file has any HED data.
9696
*/
97-
public get hasHedData(): boolean {
97+
public override get hasHedData(): boolean {
9898
return this.parsedTsv.has('HED') || this.mergedSidecar.hasHedData
9999
}
100100

src/parser/parsedHedGroup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export default class ParsedHedGroup extends ParsedHedSubstring {
207207
*
208208
* @returns The original string for this group.
209209
*/
210-
public toString(): string {
210+
public override toString(): string {
211211
return this.originalTag
212212
}
213213

src/parser/parsedHedTag.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export default class ParsedHedTag extends ParsedHedSubstring {
225225
*
226226
* @returns The original form of this HED tag.
227227
*/
228-
public toString(): string {
228+
public override toString(): string {
229229
if (this.schema?.prefix) {
230230
return this.schema.prefix + ':' + this.originalTag
231231
} else {

src/schema/entries.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export class SchemaEntryWithAttributes extends SchemaEntry {
279279
* @param attributeName - The attribute to check for.
280280
* @returns Whether this schema entry has this attribute.
281281
*/
282-
public hasBooleanAttribute(attributeName: string): boolean {
282+
public override hasBooleanAttribute(attributeName: string): boolean {
283283
return this.booleanAttributeNames.has(attributeName)
284284
}
285285

@@ -724,7 +724,7 @@ export class SchemaValueTag extends SchemaTag {
724724
/**
725725
* This tag's long name.
726726
*/
727-
public get longName(): string {
727+
public override get longName(): string {
728728
const nameParts = this.ancestors.map((parentTag) => parentTag.name)
729729
nameParts.reverse()
730730
nameParts.push('#')
@@ -737,7 +737,7 @@ export class SchemaValueTag extends SchemaTag {
737737
* @param extension - The extension.
738738
* @returns The extended short string.
739739
*/
740-
public extend(extension: string): string {
740+
public override extend(extension: string): string {
741741
return this.parent.extend(extension)
742742
}
743743

@@ -747,7 +747,7 @@ export class SchemaValueTag extends SchemaTag {
747747
* @param extension - The extension.
748748
* @returns The extended long string.
749749
*/
750-
public longExtend(extension: string): string {
750+
public override longExtend(extension: string): string {
751751
return this.parent.longExtend(extension)
752752
}
753753
}

tsconfig.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,15 @@
55
"checkJs": false,
66
"target": "esnext",
77
"module": "esnext",
8-
"moduleResolution": "node",
8+
"resolveJsonModule": true,
99
"skipLibCheck": true,
10-
"esModuleInterop": true,
11-
"allowSyntheticDefaultImports": true,
12-
"downlevelIteration": true,
13-
"typeRoots": ["./node_modules/@types"],
10+
"types": ["node"],
1411
"strict": true,
1512
"strictNullChecks": false,
1613
"strictFunctionTypes": false,
1714
"strictPropertyInitialization": false,
1815
"exactOptionalPropertyTypes": false,
19-
"resolveJsonModule": true
16+
"noImplicitOverride": true
2017
},
2118
"include": ["index.ts", "src/**/*"],
2219
"exclude": ["node_modules", "dist"]

0 commit comments

Comments
 (0)