#NestJs Weird imports

6 messages · Page 1 of 1 (latest)

ornate merlin
#

Hello, Is there a good reason why I am allowed to import isString from the class validator package? This is not even deprecated.
I find it confusing that I'm allowed to do that, I should only be able to import IsString from the package imo.

wise latch
rocky bridge
whole mango
# ornate merlin Hello, Is there a good reason why I am allowed to import isString from the class...

first of all isString != IsString
second i vaguely remembering the core team had to fork class-validator because it wasn't being updated anymore or something like that
https://github.com/nestjs/class-validator

GitHub

Fork of the class-validator package. Decorator-based property validation for classes. - GitHub - nestjs/class-validator: Fork of the class-validator package. Decorator-based property validation for...

ornate merlin
#

IsString is the right one xD