diff --git a/src/06-identity-functions/30.6-reverse-mapped-types-on-tuples.problem.ts b/src/06-identity-functions/30.6-reverse-mapped-types-on-tuples.problem.ts new file mode 100644 index 0000000..c4477ab --- /dev/null +++ b/src/06-identity-functions/30.6-reverse-mapped-types-on-tuples.problem.ts @@ -0,0 +1,17 @@ +type Command = { + cliCommand: string; + args: [...TArgs]; + run: (...args: NoInfer) => void; +}; + +const createCommand = (command: Command) => { + return command; +}; + +const commands = createCommand({ + args: ["name", "example"], + cliCommand: "hello", + run: (str) => { + console.log(`Hello, ${str[0]}`); + }, +});