mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-24 03:39:01 +08:00
chore: Use proper types for configure
methods (Extension/Mark/Node) (#5421)
This commit is contained in:
parent
6543f059ff
commit
068559d0ac
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user