[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
}
原文地址:https://www.cnblogs.com/Answer1215/p/10289364.html