ERROR in src/main/webapp/app/note/note-editor/note-editor.component.html:182:59 - error TS2322: Type '{ theme: string; language: string; minimap: { enabled: boolean; }; wordWrap: string; }' is not assignable to type 'IStandaloneEditorConstructionOptions'.
Types of property 'wordWrap' are incompatible.
Type 'string' is not assignable to type '"on" | "off" | "wordWrapColumn" | "bounded" | undefined'.
Version: "@materia-ui/ngx-monaco-editor": "^5.0.0" 、"monaco-editor": "^0.22.3"
Usage:
<ngx-monaco-editor fxFill #codeEditor [options]="editorOptions" [(ngModel)]="note.content" (init)="editorInit($event)" (keyup)="send()"> </ngx-monaco-editor>
editorOptions = { theme: 'vs-dark', language: 'markdown', minimap: { enabled: false, }, wordWrap: "on", };
Got the problem:
ERROR in src/main/webapp/app/note/note-editor/note-editor.component.html:182:59 - error TS2322: Type '{ theme: string; language: string; minimap: { enabled: boolean; }; wordWrap: string; }' is not assignable to type 'IStandaloneEditorConstructionOptions'. Types of property 'wordWrap' are incompatible. Type 'string' is not assignable to type '"on" | "off" | "wordWrapColumn" | "bounded" | undefined'.
182 <ngx-monaco-editor #codeEditor [options]="editorOptions" [(ngModel)]="note.content"
Thank you!!!