use unused typevar when encountering unknown value or lambda parameter - type inferencing still not entirely correct
This commit is contained in:
parent
d7a4e210a2
commit
496463bbac
8 changed files with 94 additions and 66 deletions
|
|
@ -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)} />
|
||||
:: <Type type={getType(resolved)} />
|
||||
</div>
|
||||
<input
|
||||
ref={commandInputRef}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue