kit
kit copied to clipboard
Arg never resolves if the value of list of choices is a function
Given this simple script:
import '@johnlindquist/kit';
const content = await clipboard.readText();
const availableTemplates = [
{ name: 'let binding',
value: ({content}) => `let ${content} = `,
},
];
const selectedTemplate = await arg('Select one template', availableTemplates);
Arg never resolves. If I change it to be just a string, then it works fine. Given that the type definition says that type could be any, this is a surprise
The value does get sent and serialized between the script and the app, so it's anything serializable. I'll take a look at the types
That makes sense. Then why is it not throwing an error or something?
On Fri, Feb 3, 2023 at 7:40 PM John Lindquist @.***> wrote:
The value does get sent and serialized between the script and the app, so it's anything serializable. I'll take a look at the types
— Reply to this email directly, view it on GitHub https://github.com/johnlindquist/kit/issues/1098#issuecomment-1416256260, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARKJWMJ5UGI3DQDQSFP7HDWVVGJHANCNFSM6AAAAAAUQR6E4A . You are receiving this because you authored the thread.Message ID: @.***>
--
https://danielorodriguez.com