mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 06:03:22 +08:00
refactoring
This commit is contained in:
parent
7a9b1f5c46
commit
81db30e7d2
@ -171,13 +171,10 @@ export class Extension<Options = any, Commands = any> {
|
||||
return new Extension<O, C>(config)
|
||||
}
|
||||
|
||||
configure(options?: Partial<Options>) {
|
||||
configure(options: Partial<Options> = {}) {
|
||||
return Extension
|
||||
.create<Options, Commands>(this.config as ExtensionConfig<Options, Commands>)
|
||||
.#configure({
|
||||
...this.config.defaultOptions,
|
||||
...options,
|
||||
})
|
||||
.#configure(options)
|
||||
}
|
||||
|
||||
#configure = (options: Partial<Options>) => {
|
||||
|
@ -231,13 +231,10 @@ export class Mark<Options = any, Commands = {}> {
|
||||
return new Mark<O, C>(config)
|
||||
}
|
||||
|
||||
configure(options?: Partial<Options>) {
|
||||
configure(options: Partial<Options> = {}) {
|
||||
return Mark
|
||||
.create<Options, Commands>(this.config as MarkConfig<Options, Commands>)
|
||||
.#configure({
|
||||
...this.config.defaultOptions,
|
||||
...options,
|
||||
})
|
||||
.#configure(options)
|
||||
}
|
||||
|
||||
#configure = (options: Partial<Options>) => {
|
||||
|
@ -298,13 +298,10 @@ export class Node<Options = any, Commands = {}> {
|
||||
return new Node<O, C>(config)
|
||||
}
|
||||
|
||||
configure(options?: Partial<Options>) {
|
||||
configure(options: Partial<Options> = {}) {
|
||||
return Node
|
||||
.create<Options, Commands>(this.config as NodeConfig<Options, Commands>)
|
||||
.#configure({
|
||||
...this.config.defaultOptions,
|
||||
...options,
|
||||
})
|
||||
.#configure(options)
|
||||
}
|
||||
|
||||
#configure = (options: Partial<Options>) => {
|
||||
|
Loading…
Reference in New Issue
Block a user