Skip to content

Can't init a theme with partial options in TypeScript #444

@IGassmann

Description

@IGassmann

When trying to init a theme and passing partial options, TypeScript throws an error because the theme and styles properties are marked as required in the interface CreateThemeOptions. This can be reproduced with the following:

import { materialInit } from '@uiw/codemirror-theme-material';

<CodeMirror
  theme={materialInit({
    settings: {
      caret: '#c6c6c6',
      fontFamily: 'monospace',
    }
  })}
/>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions