I'm sorry for this question, because I know the answer has to exist somewhere, but I don't think i have a deep enough understanding of Typescript to even know what I'm supposed to be searching for.
My problem is that I have added a jquery plugin called
as well as a global variable on the window object named
which is for communicating to my c# wrapper app.
These items are causing errors when I compile, and I want to get rid of the errors, so what am I supposed to do? I thought maybe I'm supposed to created definitions for these items, but I can't find any documentation for how to do that, since
already has a definition, because I installed the
, and it appears maybe the
object already has a definition as well.
Here are the errors I'm getting:
Property 'typeahead' does not exist on type 'JQuery'.
Property 'bound' does not exist on type 'Window'.
So, what do I do to make the errors stop? If i'm supposed to write definitions, where do the definitions go, and how do I write definitions for objects that already have definitions?
I tried making a file in the root of my project called
, but as soon as I created that file, with no code in it, i got this error:
WARNING in ./src/index.d.ts
Module build failed: Error: Debug Failure. False expression: Output generation failed
I tried adding interface statements, module declaration statements, and namespace declaration statements, and nothing can make the error go away. Is the filename wrong? Is the file supposed to be in a certain location?
I've read the documenation here: https://www.typescriptlang.org/docs/handbook/writing-declaration-files.html
But I can't see anything about where the definition go, or how to write definitions for objects that already exist.
thanks in advance for any help anyone can give.
Definitely Typed, nor Typings contain definitions for the typeahead library I'm using, nor for the global
object i created. I need to understand how to manually get rid of these errors.