Skip to content

Make Appender Type extensible from other modules and the user#1267

Merged
lamweili merged 3 commits intolog4js-node:masterfrom
ZachHaber:master
Jun 9, 2022
Merged

Make Appender Type extensible from other modules and the user#1267
lamweili merged 3 commits intolog4js-node:masterfrom
ZachHaber:master

Conversation

@ZachHaber
Copy link
Copy Markdown
Contributor

Appender was a discriminated type union, which unfortunately made it so that it wasn't able to be modified. Now you can update the Appenders interface with new values to enable modification.

declare module './log4js' {
  interface Appenders {
    StorageTestAppender: {
      type: 'storageTest';
      storageMedium: 'dvd' | 'usb' | 'hdd';
    };
  }
}

Most of the changes in this PR are prettier being run, as I also set up the editorconfig to apply properly to typescript files as well.

The gitattributes was also missing typescript files.

@lamweili lamweili added this to the 6.5.3 milestone Jun 9, 2022
@lamweili lamweili added the enhancement New feature or request label Jun 9, 2022
Copy link
Copy Markdown
Contributor

@lamweili lamweili left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZachHaber Thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants