Skip to content

Commit

Permalink
fix: Fix error related to "Types must be imported using a type-only i…
Browse files Browse the repository at this point in the history
…mport when 'verbatimModuleSyntax' is enabled"
  • Loading branch information
jaywcjlove committed Feb 24, 2024
1 parent 4e45053 commit e6e89ca
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions core/src/getDefaultExtensions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Extension } from '@codemirror/state';
import { type Extension } from '@codemirror/state';
import { indentWithTab } from '@codemirror/commands';
import { basicSetup, BasicSetupOptions } from '@uiw/codemirror-extensions-basic-setup';
import { basicSetup, type BasicSetupOptions } from '@uiw/codemirror-extensions-basic-setup';
import { EditorView, keymap, placeholder } from '@codemirror/view';
import { oneDark } from '@codemirror/theme-one-dark';
import { EditorState } from '@codemirror/state';
Expand Down
8 changes: 4 additions & 4 deletions core/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { useRef, forwardRef, useImperativeHandle } from 'react';
import { EditorState, EditorStateConfig, Extension, StateField } from '@codemirror/state';
import { EditorView, ViewUpdate } from '@codemirror/view';
import { BasicSetupOptions } from '@uiw/codemirror-extensions-basic-setup';
import type { EditorState, EditorStateConfig, Extension, StateField } from '@codemirror/state';
import type { EditorView, ViewUpdate } from '@codemirror/view';
import { type BasicSetupOptions } from '@uiw/codemirror-extensions-basic-setup';
import { useCodeMirror } from './useCodeMirror';
import { Statistics } from './utils';
import { type Statistics } from './utils';

export * from '@codemirror/view';
export * from '@codemirror/state';
Expand Down
4 changes: 2 additions & 2 deletions core/src/useCodeMirror.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useEffect, useState } from 'react';
import { Annotation, EditorState, StateEffect, type Extension } from '@codemirror/state';
import { EditorView, ViewUpdate } from '@codemirror/view';
import { EditorView, type ViewUpdate } from '@codemirror/view';
import { getDefaultExtensions } from './getDefaultExtensions';
import { getStatistics } from './utils';
import { ReactCodeMirrorProps } from '.';
import { type ReactCodeMirrorProps } from '.';

const External = Annotation.define<boolean>();

Expand Down
4 changes: 2 additions & 2 deletions core/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EditorSelection, SelectionRange, Line } from '@codemirror/state';
import { ViewUpdate } from '@codemirror/view';
import type { EditorSelection, SelectionRange, Line } from '@codemirror/state';
import type { ViewUpdate } from '@codemirror/view';

export interface Statistics {
/** total length of the document */
Expand Down

1 comment on commit e6e89ca

@jaywcjlove
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.