Skip to content

Define a model property name as dynamic #1626

Answered by markcowl
myakimov asked this question in Q&A
Discussion options

You must be logged in to vote

Hmmm, so it is possible to add additional undefined properties by using Record<T> but that would allow any number of properties with unknown keys.

For example:

model Foo is Record<unknown> {}

Which would allow properties with valid keys and any type.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by markcowl
Comment options

You must be logged in to vote
1 reply
@timotheeguerin
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants