Types missing in `CmsConfig` for new rich text widget field
- Dominant language
- JavaScript
- Stars
- 19.4k
- Forks
- 3.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
**Describe the bug**
When using `decap-cms-app`, the configuration types don’t include types for the new `richtext` widget.
**To Reproduce**
For example, the following code produces a type error:
```js
import CMS from 'decap-cms-app';
CMS.init({
config: {
backend: { name: 'github' },
collections: [
{
name: 'example',
label: 'Example',
fields: [{ name: 'body', label: 'Content', widget: 'richtext' }],
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Type '{ name: string; label: string; widget: string; }' is not assignable to type 'CmsField'.
// Type '{ name: string; label: string; widget: string; }' is not assignable to type 'CmsFieldBase & CmsFieldMeta'.
// Type '{ name: string; label: string; widget: string; }' is missing the following properties from type 'CmsFieldMeta': required, index_file, metats(2322)
},
],
},
});
```
**Expected behavior**
Setting `widget: 'richtext'` should not produce a type error
**Applicable Versions:**
- Decap CMS version: `"decap-cms-app": "^3.12.2"`
- OS: macOS
- Node.JS version: 24.15
Contributor guide
Assessment
This issue has not been assessed yet.