Skip to content

Commit

Permalink
Merge pull request #28 from SARDONYX-sard/feature/refactor
Browse files Browse the repository at this point in the history
refactor: update type definitions for VimModeRef and VimStatusRef in …
  • Loading branch information
SARDONYX-sard authored Jan 22, 2025
2 parents 36b0536 + 8909edc commit 6f9f508
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// issue: https://github.com/suren-atoyan/monaco-react/issues/136#issuecomment-731420078
import Editor, { type OnMount } from '@monaco-editor/react';
import { isTauri } from '@tauri-apps/api/core';
import { type ComponentPropsWithoutRef, type MutableRefObject, memo, useCallback, useEffect, useRef } from 'react';
import { type ComponentPropsWithoutRef, type RefObject, memo, useCallback, useEffect, useRef } from 'react';

import { start } from '@/services/api/shell';

Expand All @@ -15,8 +15,8 @@ import type monaco from 'monaco-editor/esm/vs/editor/editor.api';
import type { VimEnvironment } from 'monaco-vim';

export type MonacoEditor = monaco.editor.IStandaloneCodeEditor;
export type VimModeRef = MutableRefObject<VimEnvironment | null>;
export type VimStatusRef = MutableRefObject<HTMLDivElement | null>;
export type VimModeRef = RefObject<VimEnvironment | null>;
export type VimStatusRef = RefObject<HTMLDivElement | null>;

type Props = ComponentPropsWithoutRef<typeof Editor> & {
id?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { MonacoEditor, VimModeRef, VimStatusRef } from '@/components/organisms/MonacoEditor/MonacoEditor';

import type MonacoVim from 'monaco-vim';
import type { Vim } from 'monaco-vim';
import type { MonacoEditor, VimModeRef, VimStatusRef } from './MonacoEditor';

type DefineVimExCommand = {
actionId: string;
Expand Down

0 comments on commit 6f9f508

Please sign in to comment.