maghis / types-joi

TypeScript types for joi (Object schema description language and validator for JavaScript objects) https://github.com/hapijs/joi
28 stars 4 forks source link

Errors after adding to the project #3

Open huksley opened 5 years ago

huksley commented 5 years ago

When I add import { InterfaceFrom } from 'types-joi' to the code, I get the following error invoking tsc:

[build] node_modules/types-joi/index.d.ts:67:26 - error TS2304: Cannot find name 'readonly'.
[build] 
[build] 67         allow<U>(values: readonly U[]): Schema<T | U>;

My dependencies are

typescript": "^3.2.2"
"joi": "^10.6.0",
"hapi": "^16.6.2",

Unfortunately I can`t upgrade hapi

maghis commented 5 years ago

@huksley you have to update to the latest Typescript, you have be at least on 3.4

huksley commented 5 years ago

IMO it would be good to have it added to README. Btw typescriptVersion: "x.x.x" not enforced right by npm/yarn :-(