Skip to content

Commit

Permalink
chore: Use proper types for configure methods (Extension/Mark/Node)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfgamaral committed Jul 30, 2024
1 parent 7d6c939 commit c40c62b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/Extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Mark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c40c62b

Please sign in to comment.