You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 14, 2023. It is now read-only.
Let's say that we have the following Rune factory:
functiongreeting<X>(...args: RunicArgs<X,[name: string,isCool: boolean]>){const[name,isCool]=RunicArgs.resolve(args)// ... do something with these Runes}
What do we do if we want to transform one of the supplied Runes?
^ this isn't super clean. One place where this is especially apparent is in the instantiate method of InkMetadataRune, in which we want to fallback to sensible defaults for certain arguments when not provided.
Solution
I propose that RunicArgs.resolve accept an optional second argument, a partial mapping from index to transform.
Let's say that we have the following Rune factory:
What do we do if we want to transform one of the supplied Runes?
^ this isn't super clean. One place where this is especially apparent is in the
instantiate
method ofInkMetadataRune
, in which we want to fallback to sensible defaults for certain arguments when not provided.Solution
I propose that
RunicArgs.resolve
accept an optional second argument, a partial mapping from index to transform.In the case of the aforementioned
instantiate
method:The text was updated successfully, but these errors were encountered: