cipchk / ngx-simplemde

Angular for simplemde(Markdown Editor)
https://cipchk.github.io/ngx-simplemde/
MIT License
36 stars 11 forks source link

Typescript errors #7

Closed HWHofstee closed 4 years ago

HWHofstee commented 5 years ago

Upgrading the stackblitz demo to version 1.1.1 results in typescript errors in this part of code: In app.module.ts:

@NgModule({ imports: [ BrowserModule, FormsModule, SimplemdeModule.forRoot({autosave: { enabled: true, uniqueId: 'MyUniqueID' }}) ], declarations: [ AppComponent ], bootstrap: [ AppComponent ] })

Argument of type '{ autosave: { enabled: boolean; uniqueId: string; }; }' is not assignable to parameter of type 'SimplemdeConfig'. Object literal may only specify known properties, and 'autosave' does not exist in type 'SimplemdeConfig'. (property) enabled: boolean

The stackblitz code can be found here: https://ngx-simplemde-ryzkrt.stackblitz.io

ChumaA commented 5 years ago

Try this:

  imports: [
    BrowserModule,
    SimplemdeModule.forRoot({
      options: { autosave: { enabled: true, uniqueId: 'MyUniqueID' } }
    })
  ],
cipchk commented 4 years ago

I think it's resolved