I am trying to enhance the JQueryStatic
interface by adding a new property called someString
, which I intend to access using $.someString
.
Within my index.ts
file, I have defined the following code:
interface JQueryStatic {
someString: string;
}
$.someString = "string";
The variable $
is of type JQueryStatic
, but despite this, I encounter the following error message:
Property 'someString' does not exist on type 'JQueryStatic'.