explorer/newFileWizard: add empty file option

Fixes: https://github.com/pybricks/pybricks-code/issues/771
This commit is contained in:
David Lechner
2022-10-28 18:01:39 -05:00
committed by David Lechner
parent 7810a8ee87
commit ede6f80f49
7 changed files with 58 additions and 11 deletions
+3 -1
View File
@@ -337,7 +337,9 @@ const templateSnippets: Array<
* Gets the template text for a Pybricks MicroPython file.
* @param hub The hub label.
*/
export function getPybricksMicroPythonFileTemplate(hub: HubLabel): string | undefined {
export function getPybricksMicroPythonFileTemplate(
hub: HubLabel | undefined,
): string | undefined {
return templateSnippets.find((t) => t.label === hub)?.insertText;
}