Skip to content

Using multiple JSONSchema types in a single file #62

Answered by cyrilletuzi
alignsoft asked this question in Q&A
Discussion options

You must be logged in to vote

In ES6+, this:

getItem<number>(keyName, { schema })

is a shortcut for this:

getItem<number>(keyName, { schema: schema })

which works only if the property and the variable have the same name. So if your variable has another name, you can't use the shortcut, you need to do this:

getItem<number>(keyName, { schema: schemaNum })

Added the info in doc.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cyrilletuzi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #62 on December 08, 2020 21:29.