From 33ed9c4f566dfb46fb892cc4df3eace2bd0a3770 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 28 Jan 2024 17:32:27 -0500 Subject: [PATCH] Add types to Explorer props. --- src/Editor.tsx | 0 src/Explorer.tsx | 5 ++++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 src/Editor.tsx diff --git a/src/Editor.tsx b/src/Editor.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/Explorer.tsx b/src/Explorer.tsx index 2c7fb80..9d093a0 100644 --- a/src/Explorer.tsx +++ b/src/Explorer.tsx @@ -21,7 +21,10 @@ In the AST on the right, you can: [fn:2] https://code.fizz.buzz/talexander/organic `; -function Explorer({ defaultValue = default_org_source }) { +interface ExplorerProps { + defaultValue?: string; +} +function Explorer({ defaultValue = default_org_source }: ExplorerProps) { function handleChange(event: React.ChangeEvent) { setValue(event.target.value); clearHighlights();