nestjs-tsx-views icon indicating copy to clipboard operation
nestjs-tsx-views copied to clipboard

Issue with viewsDirectory in TsxViewsModuleOptions

Open kaze0000 opened this issue 2 years ago • 0 comments

@pmb0 Hello, I'm facing an issue while trying to set up nestjs-tsx-views in my project.

  • Steps to Reproduce:
  1. I installed nestjs-tsx-views using Yarn, and my package.json reflects version "^2.0.0-beta.0".

  2. I tried to register the module with the following options:

TsxViewsModule.register({
   viewsDirectory: resolve(__dirname, "./views"),
});
  1. When I do this, TypeScript throws the following error:
Argument of type '{ viewsDirectory: string; }' is not assignable to parameter of type 'TsxViewsModuleOptions'.
Object literal may only specify known properties, and 'viewsDirectory' does not exist in type 'TsxViewsModuleOptions'.
  • Expected Behavior: I expected the module to accept viewsDirectory as a valid option based on the usage in the documentation (if applicable).

  • Actual Behavior: TypeScript throws an error saying viewsDirectory is not a known property of TsxViewsModuleOptions.

  • Additional Information: Node version: 18.12.0 TypeScript version: ^4.9.5

I'd appreciate any guidance on whether I might be doing something incorrectly or if this is an issue with the module itself. Thank you!

kaze0000 avatar Oct 06 '23 05:10 kaze0000