[TypeScript] Export public types from your library

If you're a library author, it's useful to expose your public types as interfaces, to allow your consumers to extend them if needed.

 

For example:

 

To resolve the issues, we can do :

// typings.d.ts

interface JQuery {
  hideChildren(): JQuery
}

 

posted @ 2019-01-18 19:18  Zhentiw  阅读(201)  评论(0)    收藏  举报