Skip to content

Commit

Permalink
fix return value spec for returned editor mode
Browse files Browse the repository at this point in the history
  • Loading branch information
haschek committed Oct 4, 2023
1 parent 89dfc4c commit ce0c08c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/extensions/codemirror/CodeMirror.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { TextareaHTMLAttributes, useEffect, useRef } from "react";
import CodeMirror from "codemirror";
import CodeMirror, { ModeSpec, ModeSpecOptions } from "codemirror";

import "codemirror/mode/markdown/markdown.js";
import "codemirror/mode/python/python.js";
Expand Down Expand Up @@ -126,7 +126,7 @@ export const CodeEditor = ({
);
};

const convertMode = (mode: SupportedCodeEditorModes | undefined): string | object | undefined => {
const convertMode = (mode: SupportedCodeEditorModes | undefined): string | ModeSpec<ModeSpecOptions> | undefined => {
switch (mode) {
case "undefined":
return undefined;
Expand Down

0 comments on commit ce0c08c

Please sign in to comment.