feat(glossy): add type-checking
- adds type-checking via the valkyrie package - fixes handling of groups parameter on #glossary() - new test for relevant changes
This commit is contained in:
9 files changed
+112
-10
No files matched your search
@@ -0,0 +1,26 @@
|
||||
// TODO: change to @preview when online
|
||||
#import "@preview/valkyrie:0.2.1" as z
|
||||
|
||||
#let dict-schema = z.either(
|
||||
z.string(),
|
||||
z.dictionary(
|
||||
(
|
||||
short: z.content(), // this is the only required field
|
||||
plural: z.content(optional: true),
|
||||
long: z.content(optional: true),
|
||||
longplural: z.content(optional: true),
|
||||
description: z.content(optional: true),
|
||||
group: z.content(optional: true),
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
#let theme-schema = z.dictionary(
|
||||
(
|
||||
section: z.function(),
|
||||
group: z.function(),
|
||||
entry: z.function(),
|
||||
)
|
||||
)
|
||||
|
||||
#let groups-list-schema = z.array(pre-transform: z.coerce.array)
|
||||
Reference in new issue
Block a user