ckeditor / ckeditor4-angular

Official CKEditor 4 Angular component.
Other
55 stars 32 forks source link

Build issue due to TS accessor errors #138

Open f1ames opened 3 years ago

f1ames commented 3 years ago

Are you reporting a feature request or a bug?

Bug

Provide detailed reproduction steps (if any)

When building ckeditor4-docs, webpack Angular compilation (starting from 2.0.0 version) throws An accessor cannot be declared in an ambient context TS errors:

image

The lines to blame are:

https://github.com/ckeditor/ckeditor4-angular/blob/6313ee68190976157b870662f62ff435057511ee/dist/ckeditor.component.d.ts#L42-L43

https://github.com/ckeditor/ckeditor4-angular/blob/6313ee68190976157b870662f62ff435057511ee/dist/ckeditor.component.d.ts#L50-L51

It might be reproduced on this commit https://github.com/ckeditor/ckeditor4-docs/commit/d5ddece92222fb8481a9cc89b99c92c4357b10e9. Seems it may be related to TS issue - https://github.com/microsoft/TypeScript/issues/33939

It also means, any project using Angular integration in a similar manner as CKEditor 4 docs may have similar issues.

f1ames commented 3 years ago

The workaround could be disabling some TS checks with:

"compilerOptions": {
    "skipLibCheck": true
}

in tsconfig.json file (helped in the docs case - see ckeditor/ckeditor4-docs@4ecd6f3).

nguacon90 commented 3 years ago

I've got the same issue