Skip to content

Issue with viewsDirectory in TsxViewsModuleOptions #203

@kaze0000

Description

@kaze0000

@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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions