为什么这个通用的Typescript定义会失败?

时间:2016-06-24 11:14:26

标签: typescript

是否有任何一种简单的方法可以导入整个库并忽略其类型?

这不起作用。为什么不呢?

$setViewValue

然后我尝试了这个(基于enter image description here),但它也不起作用。

this answer

更新

这个定义有效,但我仍然想要一个我们不需要的单行版本:

declare module 'joi' { 
  export const validate: any;
  export const object: any;
  export const string: any;
  export const required: any;
  export type ValidationOptions = any;
  export type ValidationResult<any> = any;
  export type ObjectSchema = any;
}

0 个答案:

没有答案