Describe the Bug
Trying to compile project using rc1 version results in type errors because types for class-validator are not available.
To Reproduce
1) Checkout https://github.com/rchl/type-graphql-class-validator
2) Run npm i
3) Run npm run build
Expected Behavior
Build succeeds.
Logs
> tsc
node_modules/type-graphql/dist/decorators/types.d.ts:2:39 - error TS2307: Cannot find module 'class-validator'.
2 import type { ValidatorOptions } from "class-validator";
~~~~~~~~~~~~~~~~~
node_modules/type-graphql/dist/errors/ArgumentValidationError.d.ts:1:38 - error TS2307: Cannot find module 'class-validator'.
1 import type { ValidationError } from "class-validator";
~~~~~~~~~~~~~~~~~
node_modules/type-graphql/dist/metadata/definitions/param-metadata.d.ts:1:39 - error TS2307: Cannot find module 'class-validator'.
1 import type { ValidatorOptions } from "class-validator";
~~~~~~~~~~~~~~~~~
node_modules/type-graphql/dist/schema/build-context.d.ts:2:39 - error TS2307: Cannot find module 'class-validator'.
2 import type { ValidatorOptions } from "class-validator";
~~~~~~~~~~~~~~~~~
Environment (please complete the following information):
OK, that clearly addresses my issue :)
Can maybe release notes be updated to mention that?
Currently they say Breaking Change: make class-validator an optional, peer dependency of version >=0.12.0 which gives an impression that it's not needed.
The goal is to have a separate plugin for validation that will be optional and installing class-validator won't be required.
For now, due to the typings issue with compiling, caused by monolith architecture, you need to have class-validator installed as a dev deps (when not using validation) or skipLibCheck set to true.
@rchl
What do you think is better - npm i class-validator in installation docs or skipLibCheck: true as the default recommended setting?
@MichalLytek I think it's better to have npm i class-validator as that is localized to this package and doesn't have type checking side effects on the whole project.
@rchl
Actually, that's what I've done over a month ago:

So I will just remove the "optional" info from release notes as they might be confusing.
Closing by 930a692 馃敀
Most helpful comment
@rchl
Actually, that's what I've done over a month ago:
So I will just remove the "optional" info from release notes as they might be confusing.