use unused typevar when encountering unknown value or lambda parameter - type inferencing still not entirely correct

This commit is contained in:
Joeri Exelmans 2025-05-17 10:38:54 +02:00
parent d7a4e210a2
commit 496463bbac
8 changed files with 94 additions and 66 deletions

View file

@ -71,10 +71,6 @@ export function Editor({state, setState, onCancel, suggestionPriority}: EditorPr
const globalContext = useContext(CommandContext);
const onCommand = (e: React.KeyboardEvent) => {
console.log(e);
// const type = getType(state.resolved);
// const commands = getCommands(type);
const commands = ['e', 't', 'Enter', 'Backspace', 'ArrowLeft', 'ArrowRight', 'Tab', 'l', 'L', '=', '.', 'c', 'a'];
if (!commands.includes(e.key)) {
return;
@ -199,7 +195,7 @@ export function Editor({state, setState, onCancel, suggestionPriority}: EditorPr
return <span className="editor">
{renderBlock()}
<div className="typeSignature">
<Type type={getType(resolved)} />
&nbsp;::&nbsp;<Type type={getType(resolved)} />
</div>
<input
ref={commandInputRef}