add TestResult type

This commit is contained in:
lingdocs 2021-09-18 20:19:09 -04:00
parent 4380af0a98
commit 367fded075
2 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@lingdocs/lingdocs-main",
"version": "0.0.9",
"version": "0.1.0",
"description": "types and functions for lingdocs stuff",
"main": "dist/library.js",
"module": "dist/library.js",

View File

@ -24,6 +24,12 @@ export type UserTextOptionsRecord = {
userTextOptions: UserTextOptions,
};
export type TestResult = {
done: true,
time: TimeStamp,
id: string,
}
// TODO: TYPE GUARDING SO WE NEVER HAVE A USER WITH NO Id or Password
export type LingdocsUser = {
userId: UUID,
@ -40,7 +46,7 @@ export type LingdocsUser = {
requestedOn: TimeStamp,
},
upgradeToStudentRequest?: "waiting" | "denied",
tests: [],
tests: TestResult[],
lastLogin: TimeStamp,
lastActive: TimeStamp,
userTextOptionsRecord: undefined | UserTextOptionsRecord,