ckeditor / ckeditor5-react

Official CKEditor 5 React component.
https://ckeditor.com/ckeditor-5
Other
425 stars 99 forks source link

Improve narrowing of CKEditor CDN configuration type #523

Closed Mati365 closed 2 months ago

Mati365 commented 2 months ago

Suggested merge commit message (convention)

Feature: Improve result type of useCKEditorCloud to make CKEditorPremiumFeatures and CKBox non-nullable when proper configuration is passed.
Fix: Rename the languages configuration property to translations in useCKEditorCloud.

MINOR BREAKING CHANGE: The languages configuration property has been renamed to translations in useCKEditorCloud.


Additional information

Must be released before testing:
https://github.com/ckeditor/ckeditor5-integrations-common/pull/25

PRs family: https://github.com/ckeditor/ckeditor5-vue/pull/311

const { CKEditorPremiumFeatures } = await loadCKEditorCloud( {
  version: '43.0.0',
  premium: true,
  ckbox: {
    version: '2.5.1'
  }
} );

Before:

CKEditorPremiumFeatures is nullable type.

After:

CKEditorPremiumFeatures is not nullable type because premium: true is passed.

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build e6c91205-231c-40cb-94e3-80e8a2757cf2

Details


Totals Coverage Status
Change from base Build 533e89fd-cb29-46af-8ff9-d95e3b47b910: 0.0%
Covered Lines: 582
Relevant Lines: 582

💛 - Coveralls
Mati365 commented 2 months ago

@gorzelinski done