Skip to content

Commit bbbea29

Browse files
authored
Merge pull request #270 from jcreedcmu/jcreed/enums
Convert namespaces to enums in messages.ts
2 parents 2d975de + d120388 commit bbbea29

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

extensions/ql-vscode/src/messages.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -299,15 +299,15 @@ export interface CompilationMessage {
299299
/**
300300
* Severity of different messages
301301
*/
302-
export namespace Severity {
302+
export enum Severity {
303303
/**
304304
* The message is a compilation error.
305305
*/
306-
export const ERROR = 0;
306+
ERROR = 0,
307307
/**
308308
* The message is a compilation warning.
309309
*/
310-
export const WARNING = 1;
310+
WARNING = 1,
311311
}
312312

313313
/**
@@ -344,31 +344,31 @@ export interface ResultColumn {
344344
/**
345345
* The kind of a result column.
346346
*/
347-
export namespace ResultColumnKind {
347+
export enum ResultColumnKind {
348348
/**
349349
* A column of type `float`
350350
*/
351-
export const FLOAT = 0;
351+
FLOAT = 0,
352352
/**
353353
* A column of type `int`
354354
*/
355-
export const INTEGER = 1;
355+
INTEGER = 1,
356356
/**
357357
* A column of type `string`
358358
*/
359-
export const STRING = 2;
359+
STRING = 2,
360360
/**
361361
* A column of type `boolean`
362362
*/
363-
export const BOOLEAN = 3;
363+
BOOLEAN = 3,
364364
/**
365365
* A column of type `date`
366366
*/
367-
export const DATE = 4;
367+
DATE = 4,
368368
/**
369369
* A column of a non-primitive type
370370
*/
371-
export const ENTITY = 5;
371+
ENTITY = 5,
372372
}
373373

374374
/**
@@ -765,29 +765,29 @@ export interface EvaluationResult {
765765
/**
766766
* The result of running a query,
767767
*/
768-
export namespace QueryResultType {
768+
export enum QueryResultType {
769769
/**
770770
* The query ran successfully
771771
*/
772-
export const SUCCESS = 0;
772+
SUCCESS = 0,
773773
/**
774774
* The query failed due to an reason
775775
* that isn't listed
776776
*/
777-
export const OTHER_ERROR = 1;
777+
OTHER_ERROR = 1,
778778
/**
779779
* The query failed due to running out of
780780
* memory
781781
*/
782-
export const OOM = 2;
782+
OOM = 2,
783783
/**
784784
* The query failed due to exceeding the timeout
785785
*/
786-
export const TIMEOUT = 3;
786+
TIMEOUT = 3,
787787
/**
788788
* The query failed because it was cancelled.
789789
*/
790-
export const CANCELLATION = 4;
790+
CANCELLATION = 4,
791791
}
792792

793793
/**

0 commit comments

Comments
 (0)