Steps to reproduce
- Download Obsidian
- Create a vault and close obsidian
- Download the sample plugin in the .obsidian/plugins folder
- Use this snippet to extends
RangeValue
import {RangeValue} from "@codemirror/state";
class TestValue extends RangeValue {}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const test = new TestValue();
- Open the vault with obsidian
- Go in Settings > Community Plugin and activate the plugin
Observe the error message in the console:
Plugin failure: obsidian-collaborate TypeError: Class extends value undefined is not a constructor or null
When inspecting the imported module, there are missing types, including the RangeValue
.
import_state: Module
Annotation: (...)
AnnotationType: (...)
ChangeDesc: (...)
ChangeSet: (...)
CharCategory: (...)
Compartment: (...)
EditorSelection: (...)
EditorState: (...)
Facet: (...)
MapMode: (...)
Prec: (...)
SelectionRange: (...)
StateEffect: (...)
StateEffectType: (...)
StateField: (...)
Text: (...)
Transaction: (...)
combineConfig: (...)
Expected result
The module @codemirror/state
is completely imported and RangeValue
can be extended.
Actual result
The imported @codemirror/state
module do not contains all of its types.
Environment
- Operating system: Windows 10
- Debug info:
SYSTEM INFO:
Obsidian version: v0.14.15
Installer version: v0.12.19
Operating system: Windows 10 Pro 10.0.19044
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Safe mode: off
Plugins installed: 1
Plugins enabled: 0
RECOMMENDATIONS:
none