chore: Use proper types for configure methods (Extension/Mark/Node) (#5421)

This commit is contained in:
Ricardo Amaral 2024-07-31 23:28:51 +01:00 committed by GitHub
parent 6543f059ff
commit 068559d0ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -457,7 +457,7 @@ export class Extension<Options = any, Storage = any> {
configure(options: Partial<Options> = {}) {
// return a new instance so we can use the same extension
// with different calls of `configure`
const extension = this.extend({
const extension = this.extend<Options, Storage>({
...this.config,
addOptions: () => {
return mergeDeep(this.options as Record<string, any>, options) as Options

View File

@ -589,7 +589,7 @@ export class Mark<Options = any, Storage = any> {
configure(options: Partial<Options> = {}) {
// return a new instance so we can use the same extension
// with different calls of `configure`
const extension = this.extend({
const extension = this.extend<Options, Storage>({
...this.config,
addOptions: () => {
return mergeDeep(this.options as Record<string, any>, options) as Options

View File

@ -780,7 +780,7 @@ export class Node<Options = any, Storage = any> {
configure(options: Partial<Options> = {}) {
// return a new instance so we can use the same extension
// with different calls of `configure`
const extension = this.extend({
const extension = this.extend<Options, Storage>({
...this.config,
addOptions: () => {
return mergeDeep(this.options as Record<string, any>, options) as Options