I have a d.ts file with a variable declaration, like this:
declare var $: () => SomeValue;
And it is works good, in other places i can use this variable without import.
But, when i add some import from another module, this variable is not visible from other code.
import { SomeValue } from "./SomeModule";
declare var $: () => SomeValue;
What the syntax for this need?
declare. It has to do with the distinction between whether a file is assumed to be a script or a module. A module is a file containing 1 or moreimportorexportstatements. Declarations in a module are scoped to that module and must be exported for external consumption.