I assume you’re talking about Go here?
The TS docs basically just say "use declare to declare [thing]" over and over, and it's only mentioned in the handbook on a page that doesn't seem to be listed in the handbook menu anywhere.[0] You have to search for it and wing it, because the search result for this just says "By Example." Notice that there is no article highlighted in the handbook menu on the left like there would be on any of the pages listed there.
[0]: https://www.typescriptlang.org/docs/handbook/declaration-fil...
Maybe Rust or Clojure...?