I'm trying to import jquery into my TypeScript project.
To do this I ran tsd install jquery --save which created me a jquery.d.ts file, and which added /// <reference path="jquery/jquery.d.ts" /> to my tsd.d.ts file.
When adding import * as $ from 'jquery'; to the top of the file I'm working on, I then get 77 compile errors from jquery.d.ts. All are in the form: cannot find name "document". As well as Document, it can't find: Element, Event, Node, HtmlElement, XmlDocument, Text and XMLHttpRequest
See screenshot below for a few examples:
Does anyone have any suggestions as to what I need to do?

Have you tried restarting Visual Studio Code (or
Reload Window)? I do find that it gets confused quite often when declarations get installed or changed.The types are defined and come as part of Visual Studio Code and are automatically available within VSCode (you should not have to manually reference them):
Also:
Consider using
typings, which is the successor totsd(you can still consume type declarations from the tsd library - e.g.:typings search jqueryandtypings install --save --global dt~jquerywheredt~means install from DefinitelyTyped repository)Consider using a
tsconfig.jsonfile to specify the workspace area for TypeScript andexcludethenode_modulesand thetypings/tsd folders