Skip to content

Commit

Permalink
Refactored const to pure types
Browse files Browse the repository at this point in the history
  • Loading branch information
Longboyy committed May 14, 2024
1 parent 7512e6c commit 459d480
Showing 1 changed file with 3 additions and 25 deletions.
28 changes: 3 additions & 25 deletions env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,31 +719,9 @@ type Nullsec = Lowsec & PlayerNullsec & {
}
}

const MongoTypes = {
"minKey": -1,
"double": 1,
"string": 2,
"object": 3,
"array": 4,
"binData": 5,
"undefined": 6, /** deprecated */
"objectId": 7,
"bool": 8,
"date": 9,
"null": 10,
"regex": 11,
"dbPointer": 12, /** deprecated */
"javascript": 13,
"symbol": 14, /** deprecated */
"int": 16,
"timestamp": 17,
"long": 18,
"decimal": 19,
"maxKey": 127
} as const;

type MongoTypeString = keyof typeof MongoTypes;
type MongoTypeNumber = typeof MongoTypes[keyof typeof MongoTypes];
type MongoTypeString = "minKey" | "double" | "string" | "object" | "array" | "binData" | "undefined" | "objectId" |
"bool" | "date" | "null" | "regex" | "dbPointer" | "javascript" | "symbol" | "int" | "timestamp" | "long" | "decimal" | "maxKey";
type MongoTypeNumber = -1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 127;

type MongoValue = string | number | boolean | Date | MongoValue[] | { [key: string]: MongoValue } | null

Expand Down

0 comments on commit 459d480

Please sign in to comment.