MichalLytek / class-transformer-validator

A simple plugin for class-transformer and class-validator which combines them in a nice and programmer-friendly API.
MIT License
200 stars 19 forks source link

Cannot find name 'object' #7

Closed kolisko closed 6 years ago

kolisko commented 6 years ago

Could you change 'object' to 'Object' in index.d.ts please?

I have got 10 errors in index.d.ts file like this:

class-transformer-validator/index.d.ts:19:56 Cannot find name 'object'.

MichalLytek commented 6 years ago

object types has been introduced in TS 2.2: https://blog.mariusschulz.com/2017/02/24/typescript-2-2-the-object-type

And the type is intended to be object to prevent wrong usage of the function, without manual JS typechecking inside lib function. Why you just don't upgrade your typescript package version?

kolisko commented 6 years ago

yes, you are certainly right. It was a bit more difficult to switch to TS2.2 on our project, but it was successfully done. Thanks! You can close it.