diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-11-26 15:32:41 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-11-26 15:32:41 +0100 |
commit | 1df15b2ceaef09b48a39aa6046b577da11ea2f72 (patch) | |
tree | cf8dd5340703961c53daae1b2e7d0535d785f6d4 /static/types.ts | |
parent | Slightly better error hnadling in directory-table. (diff) | |
download | calp-1df15b2ceaef09b48a39aa6046b577da11ea2f72.tar.gz calp-1df15b2ceaef09b48a39aa6046b577da11ea2f72.tar.xz |
Got categories working.
Diffstat (limited to 'static/types.ts')
-rw-r--r-- | static/types.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/static/types.ts b/static/types.ts index 2c26308e..567b9a95 100644 --- a/static/types.ts +++ b/static/types.ts @@ -129,7 +129,7 @@ type known_ical_types | 'URL' | 'VERSION' -let valid_input_types: Map<string, ical_type | ical_type[]> = +let valid_input_types: Map<string, Array<ical_type | ical_type[]>> = new Map([ ['ACTION', ['text']], // AUDIO|DISPLAY|EMAIL|*other* ['ATTACH', ['uri', 'binary']], @@ -178,7 +178,7 @@ let valid_input_types: Map<string, ical_type | ical_type[]> = ['UID', ['text']], ['URL', ['uri']], ['VERSION', ['text']], - ]) as Map<string, ical_type | ical_type[]> + ]) // type JCalLine { // } @@ -191,7 +191,9 @@ type uid = string What really are valid values for any? Does that depend on ical_type? Why is the tail a list? What really is the type for the parameter map? */ -type JCalProperty = [string, Map<string, any>, ical_type, any[]] +type JCalProperty + = [string, Record<string, any>, ical_type, any] + | [string, Record<string, any>, ical_type, ...any[]] type JCal = [tagname, JCalProperty[], JCal[]] |