arb / celebrate

A joi validation middleware for Express.
MIT License
1.33k stars 66 forks source link

typescript wont build with the latest version 13 #192

Closed j-d-carmichael closed 4 years ago

j-d-carmichael commented 4 years ago

The new version 13.0.0 causes typescript to spit out a few errors:

> ttsc -p .

node_modules/celebrate/lib/index.d.ts:110:5 - error TS2377: Constructors for derived classes must contain a 'super' call.

110     constructor(message?:string, opts?: { celebrated?: boolean }) {}
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/celebrate/lib/index.d.ts:110:67 - error TS1183: An implementation cannot be declared in ambient contexts.

110     constructor(message?:string, opts?: { celebrated?: boolean }) {}

Screenshot from 2020-09-05 11-36-43

arb commented 4 years ago

Pull requests welcome 😄 I don't use TS so I make the type def file available as a courtesy. I do my best but I don't know TS well enough to always be 100% sure it's what TS considers "correct".

k0ff33 commented 4 years ago

https://github.com/arb/celebrate/pull/194 fixes the issue.