forked from e-mission/e-mission-phone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- While the types themselves may be subject to change, the goal is to set up a good foundation for strict typing in the future! As such, I added some to a basic version of Jiji's diaryTypes (see PR e-mission#1061), and will be updating those regularly.
- Loading branch information
1 parent
b7abd98
commit e6abae8
Showing
3 changed files
with
58 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* This is a draft of diaryTypes, originally added in PR #1061. This file appears | ||
in #1052 as well; these three will most likely be consolidated and rewritten in a | ||
future PR */ | ||
export type LocalDt = { | ||
minute: number, | ||
hour: number, | ||
second: number, | ||
day: number, | ||
weekday: number, | ||
month: number, | ||
year: number, | ||
timezone: string, | ||
} | ||
|
||
export type MetaData = { | ||
key: string, | ||
platform: string, | ||
write_ts: number, | ||
time_zone: string, | ||
write_fmt_time: string, | ||
write_local_dt: LocalDt, | ||
} | ||
|
||
export type ServerDataPoint = { | ||
data: any, | ||
metadata: MetaData, | ||
key?: string, | ||
user_id?: { $uuid: string, }, | ||
_id?: { $oid: string, }, | ||
} | ||
|
||
/* These are the objects returned from BEMUserCache calls */ | ||
export type ServerData = { | ||
phone_data: Array<ServerDataPoint> | ||
} | ||
|
||
export type TimeQuery = { | ||
key: string; | ||
startTs: number; | ||
endTs: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export interface FsWindow extends Window { | ||
requestFileSystem: ( | ||
type: number, | ||
size: number, | ||
successCallback: (fs: any) => void, | ||
errorCallback?: (error: any) => void | ||
) => void; | ||
LocalFileSystem: { | ||
TEMPORARY: number; | ||
PERSISTENT: number; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters