readium / r2-shared-js

Shared models for Readium Desktop
BSD 3-Clause "New" or "Revised" License
11 stars 11 forks source link

Use TypeScript enums for well-known string enumerations (EPUB metadata) #14

Closed danielweck closed 5 years ago

danielweck commented 5 years ago

...also make sure that parsed values (e.g. from XML source) are filtered as per the allowed enumerated values. Avoid boilerplate code by automating the "enum" checks (which is not a native Javascript type, just a TypeScript constructs that transpiles to plain string definitions)

danielweck commented 5 years ago

Fixed https://github.com/readium/r2-shared-js/commit/036f3c5981de8a28201836deab5c613a9c2a81ad