Add types to Explorer props.

This commit is contained in:
Tom Alexander 2024-01-28 17:32:27 -05:00
parent a11201363e
commit 33ed9c4f56
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 4 additions and 1 deletions

0
src/Editor.tsx Normal file
View File

View File

@ -21,7 +21,10 @@ In the AST on the right, you can:
[fn:2] https://code.fizz.buzz/talexander/organic [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<HTMLTextAreaElement>) { function handleChange(event: React.ChangeEvent<HTMLTextAreaElement>) {
setValue(event.target.value); setValue(event.target.value);
clearHighlights(); clearHighlights();