Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored code to make use of interface generics from monaco-editor #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bkataru
Copy link

@bkataru bkataru commented Dec 30, 2023

Refactored MonacoInlineCompletion into its own file to reuse the class to redefine some interfaces as interface generics in accordance with the monaco-editor API because MonacoInlineCompletion is after all an implementation of the monaco.languages.InlineCompletion interface.

Also added the following type-guard for inlineCompletionItems to remove the type assertion as monaco.languages.InlineCompletion[]

      .filter(
        (item?: MonacoInlineCompletion): item is MonacoInlineCompletion =>
          !!item
      );

@khou22 khou22 requested a review from andyzg February 7, 2024 18:59
Copy link
Contributor

@andyzg andyzg left a comment

Choose a reason for hiding this comment

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

Thank you for the refactor! Left one comment, and then I can test this and get this merged!

@@ -15,7 +15,7 @@
"declarationDir": "types",
"sourceMap": true,
"outDir": "dist",
"moduleResolution": "node",
"moduleResolution": "Bundler",
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reason for changing the module resolution to Bundler?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants