@@ -14,7 +14,7 @@ export const EXTRA_DATATYPES: string[] = [
1414 "rdf:HTML" ,
1515 "rdf:XMLLiteral" ,
1616 "rdf:PlainLiteral" ,
17- "rdf:langString"
17+ "rdf:langString" ,
1818]
1919
2020/**
@@ -23,7 +23,7 @@ export const EXTRA_DATATYPES: string[] = [
2323export enum Status {
2424 stable = "stable" ,
2525 reserved = "reserved" ,
26- deprecated = "deprecated"
26+ deprecated = "deprecated" ,
2727}
2828
2929/**
@@ -32,9 +32,9 @@ export enum Status {
3232 * should be removed (because it is empty), or not.
3333 */
3434export class StatusCounter {
35- private stableNum = 0 ;
36- private reservedNum = 0 ;
37- private deprecateNum = 0 ;
35+ private stableNum = 0 ;
36+ private reservedNum = 0 ;
37+ private deprecatedNum = 0 ;
3838
3939 /**
4040 * Increase the relevant counter.
@@ -52,7 +52,7 @@ export class StatusCounter {
5252 return ;
5353 }
5454 case Status . deprecated : {
55- this . deprecateNum ++ ;
55+ this . deprecatedNum ++ ;
5656 return ;
5757 }
5858 }
@@ -66,7 +66,8 @@ export class StatusCounter {
6666 switch ( status ) {
6767 case Status . stable : return this . stableNum ;
6868 case Status . reserved : return this . reservedNum ;
69- case Status . deprecated : return this . deprecateNum ;
69+ case Status . deprecated : return this . deprecatedNum ;
70+ default : throw new Error ( `Unknown term status: ${ status } ` ) ;
7071 }
7172 }
7273}
@@ -86,20 +87,20 @@ export interface Contexts {
8687 */
8788export interface GlobalData {
8889 /** Vocabulary prefix for the vocabulary being handled. */
89- vocab_prefix : string ,
90+ vocab_prefix : string ;
9091
9192 /** Vocabulary URL for the vocabulary being handled. */
92- vocab_url : string ,
93+ vocab_url : string ;
9394
9495 /** Default context URL for the vocabulary being handled. */
95- vocab_context ?: string ,
96+ vocab_context ?: string ;
9697
9798 /**
9899 * Counter for the terms with various status values.
99100 * Some serializers (e.g. HTML) may optimize/improve the final
100101 * output if one of the categories have no entries whatsoever.
101102 */
102- status_counter : StatusCounter ,
103+ status_counter : StatusCounter ;
103104
104105 /**
105106 * Inverted info for contexts: for each context the list of relevant terms are listed.
@@ -194,7 +195,7 @@ export interface ValidationResults {
194195 * If the content is valid, the error array is empty. Otherwise, the vocab field is null, and
195196 * the validation error(s) are returned.
196197 */
197- vocab : RawVocab | null ,
198+ vocab : RawVocab | null ;
198199 error : ValidationError [ ] ;
199200}
200201
@@ -203,9 +204,9 @@ export interface ValidationResults {
203204 * the generic Ajv error message is way too complex for our use)
204205 */
205206export interface ValidationError {
206- message ?: string ,
207- params ?: any ,
208- data ?: any ,
207+ message ?: string ;
208+ params ?: any ;
209+ data ?: any ;
209210}
210211
211212/* ************************************* Internal representation ***********************************/
@@ -302,11 +303,11 @@ export interface OntologyProperty {
302303 * possibly, datatypes and individuals…
303304 */
304305export interface Vocab {
305- prefixes : RDFPrefix [ ] ,
306- ontology_properties : OntologyProperty [ ]
307- classes : RDFClass [ ] ,
308- properties : RDFProperty [ ] ,
309- individuals : RDFIndividual [ ] ,
310- datatypes : RDFDatatype [ ] ,
306+ prefixes : RDFPrefix [ ] ;
307+ ontology_properties : OntologyProperty [ ] ;
308+ classes : RDFClass [ ] ;
309+ properties : RDFProperty [ ] ;
310+ individuals : RDFIndividual [ ] ;
311+ datatypes : RDFDatatype [ ] ;
311312}
312313
0 commit comments