This commit is contained in:
Greg Van Liew 2019-07-10 15:18:22 -07:00
Родитель d944647c4a
Коммит 7ac71d4cf7
11 изменённых файлов: 16 добавлений и 16 удалений

Просмотреть файл

@ -66,7 +66,7 @@ There are many extensions that provide additional snippets, including snippets f
> **Tip**: To disable snippets suggestions, set `editor.snippetSuggestions` to `"none"` in your [settings](/docs/getstarted/settings.md) file. The `editor.snippetSuggestions` setting also lets you change where snippets appear in the suggestions: at the top (`"top"`), at the bottom (`"bottom"`), or inlined ordered alphabetically (`"inline"`). The default is `"inline"`.
## JS Doc support
## JSDoc support
VS Code understands many standard [JSDoc](http://jsdoc.app) annotations, and uses these annotations to provide rich [IntelliSense](#intellisense). You can optionally even use the type information from JSDoc comments to [type check your JavaScript](#type-checking).
@ -74,7 +74,7 @@ VS Code understands many standard [JSDoc](http://jsdoc.app) annotations, and use
Sorry, your browser doesn't support HTML 5 video.
</video>
Quickly create JS Doc comments for functions by typing `/**` before the function declaration, and select the `JS Doc Comment` snippet suggestion:
Quickly create JSDoc comments for functions by typing `/**` before the function declaration, and select the **JSDoc comment** snippet suggestion:
<video src="/docs/languages/javascript/jsdoc-autofill.mp4" placeholder="images/javascript/jsdoc-autofill-placeholder.png" autoplay loop controls muted>
Sorry, your browser doesn't support HTML 5 video.
@ -263,7 +263,7 @@ You can leverage some of TypeScript's advanced type checking and error reporting
![Using type checking and Quick Fixes in a JavaScript file](images/javascript/checkjs-example.gif)
TypeScript tried to infer types in `.js` files the same way it does in `.ts` files. When types cannot be inferred, they can be specified explicitly with JSDoc comments. You can read more about how TypeScript uses JSDocs for JavaScript type checking in [Working with JavaScript](/docs/nodejs/working-with-javascript.md).
TypeScript tried to infer types in `.js` files the same way it does in `.ts` files. When types cannot be inferred, they can be specified explicitly with JSDoc comments. You can read more about how TypeScript uses JSDoc for JavaScript type checking in [Working with JavaScript](/docs/nodejs/working-with-javascript.md).
Type checking of JavaScript is optional and opt-in. Existing JavaScript validation tools such as ESLint can be used alongside built-in type checking functionality.

Просмотреть файл

@ -61,7 +61,7 @@ VS Code's TypeScript IntelliSense understands many standard [JSDoc](http://jsdoc
![TypeScript language within VS Code](images/typescript/jsdocs.png)
Keep in mind that when using JS Doc for TypeScript code, you should not include type annotations. The TypeScript compiler only uses TypeScript type annotations and ignores those from JS Doc.
Keep in mind that when using JSDoc for TypeScript code, you should not include type annotations. The TypeScript compiler only uses TypeScript type annotations and ignores those from JSDoc.
<video src="/docs/languages/typescript/jsdoc-autofill.mp4" placeholder="images/typescript/jsdoc-autofill-placeholder.png" autoplay loop controls muted>
Sorry, your browser doesn't support HTML 5 video.

Просмотреть файл

@ -13,7 +13,7 @@ This topic describes some of the advanced JavaScript features supported by Visua
## IntelliSense
Visual Studio Code's JavaScript [IntelliSense](/docs/editor/intellisense.md) provides intelligent code completion, parameter info, references search, and many other advanced language features. Our JavaScript IntelliSense is powered by the [JavaScript language service](https://github.com/Microsoft/TypeScript/wiki/JavaScript-Language-Service-in-Visual-Studio) developed by the TypeScript team. While IntelliSense should just work for most JavaScript projects without any configuration, you can make IntelliSense even more useful with [JS Docs](/docs/languages/javascript#js-doc-support) or by configuring a `jsconfig.json` project.
Visual Studio Code's JavaScript [IntelliSense](/docs/editor/intellisense.md) provides intelligent code completion, parameter info, references search, and many other advanced language features. Our JavaScript IntelliSense is powered by the [JavaScript language service](https://github.com/Microsoft/TypeScript/wiki/JavaScript-Language-Service-in-Visual-Studio) developed by the TypeScript team. While IntelliSense should just work for most JavaScript projects without any configuration, you can make IntelliSense even more useful with [JSDoc](/docs/languages/javascript#jsdoc-support) or by configuring a `jsconfig.json` project.
For the details of how JavaScript IntelliSense works, including being based on type inference, JSDoc annotations, TypeScript declarations, and mixing JavaScript and TypeScript projects, see the [JavaScript language service documentation](https://github.com/Microsoft/TypeScript/wiki/JavaScript-Language-Service-in-Visual-Studio).
@ -136,7 +136,7 @@ VS Code allows you to leverage some of TypeScript's advanced type checking and e
![Using type checking and Quick Fixes in a JavaScript file](images/working-with-javascript/checkjs-example.gif)
TypeScript can infer types in `.js` files same as in `.ts` files. When types cannot be inferred, they can be specified using JSDoc comments. You can read more about how TypeScript uses JSDocs for JavaScript type checking in [Type Checking JavaScript Files](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html).
TypeScript can infer types in `.js` files same as in `.ts` files. When types cannot be inferred, they can be specified using JSDoc comments. You can read more about how TypeScript uses JSDoc for JavaScript type checking in [Type Checking JavaScript Files](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html).
Type checking of JavaScript is optional and opt-in. Existing JavaScript validation tools such as ESLint can be used alongside the new built-in type checking functionality.

Просмотреть файл

@ -138,7 +138,7 @@ TypeScript 2.3 also brings type checking to plain JavaScript files. This is a gr
![Using type checking and quick fixes in a JavaScript file](images/1_12/ts-checkjs-example.gif)
TypeScript can infer types in `.js` files same as in `.ts` files. When types cannot be inferred, they can be specified using JSDoc comments. You can read more about how TypeScript uses JSDocs for JavaScript type checking [here](https://github.com/Microsoft/TypeScript/wiki/Type-Checking-JavaScript-Files).
TypeScript can infer types in `.js` files same as in `.ts` files. When types cannot be inferred, they can be specified using JSDoc comments. You can read more about how TypeScript uses JSDoc for JavaScript type checking [here](https://github.com/Microsoft/TypeScript/wiki/Type-Checking-JavaScript-Files).
Type checking of JavaScript is optional and opt-in. Existing JavaScript validation tools such as ESLint can be used alongside the new built-in type checking functionality.

Просмотреть файл

@ -354,7 +354,7 @@ In React JSX and TSX files, component classes are now colored differently than n
JSDoc tags such as `@deprecated` and `@private` are now displayed in hover and suggestions documentation.
![JSDocs tags sections](images/1_13/jsdocs.png)
![JSDoc tags sections](images/1_13/jsdocs.png)
### Open TS Server Log reveals log folder

Просмотреть файл

@ -185,7 +185,7 @@ Simply select some code, then click on the lightbulb in the gutter or press (`kb
### JSDoc type assertions
You can now use write JSDocs type assertions in JavaScript files:
You can now use write JSDoc type assertions in JavaScript files:
```js
// @ts-check

Просмотреть файл

@ -36,7 +36,7 @@ The release notes are arranged in the following sections related to VS Code focu
* **[Workbench](#workbench)** - Smoother scrolling on Windows, automatic save during Search and Replace.
* **[Debugging](#debugging)** - Improved Node.js process picker, postDebugTask in launch.json.
* **[Tasks](#tasks)** - Better command and argument quoting and escaping support.
* **[Languages](#languages)** - Easier IntelliSense in JSDocs, CSS path completion.
* **[Languages](#languages)** - Easier IntelliSense in JSDoc, CSS path completion.
* **[Extension Authoring](#extension-authoring)** - Long running operations with cancellation, add related information to diagnostics.
**Insiders:** Want to see new features as soon as possible? You can download the nightly [Insiders](https://code.visualstudio.com/insiders) build and try the latest updates as soon as they are available.
@ -345,11 +345,11 @@ Folding a header collapses all content and subheadings under that header.
VS Code now ships with TypeScript 2.8. This update brings support for some cool [new language features](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#typescript-28), as well as many important bug fixes and tooling improvements.
### Improved quick suggestions in JSDocs
### Improved quick suggestions in JSDoc
Did you know that VS Code provides IntelliSense for JSDoc types? This feature was added a number of releases ago but you may not have realized it because the IntelliSense only showed up if you manually invoked it. In VS Code 1.22, quick suggestions are now enabled by default in JSDoc types. Just start typing for IntelliSense to kick in:
![JSDocs suggestions](images/1_22/ts-jsdocs-quicksuggestions.gif)
![JSDoc suggestions](images/1_22/ts-jsdocs-quicksuggestions.gif)
### Suggestion Code Actions for JavaScript and TypeScript

Просмотреть файл

@ -189,7 +189,7 @@ You can now step through all breakpoints using the **Go to Next Breakpoint** and
### TypeScript 2.9
VS Code now ships with TypeScript 2.9. This update brings new language features such as [import() types](https://devblogs.microsoft.com/typescript/announcing-typescript-2-9/#import-types), [json imports](https://devblogs.microsoft.com/typescript/announcing-typescript-2-9/#json-imports), and many improvements to JS Docs. It also brings some great new tooling support and fixes a number of bugs.
VS Code now ships with TypeScript 2.9. This update brings new language features such as [import() types](https://devblogs.microsoft.com/typescript/announcing-typescript-2-9/#import-types), [json imports](https://devblogs.microsoft.com/typescript/announcing-typescript-2-9/#json-imports), and many improvements to JSDoc. It also brings some great new tooling support and fixes a number of bugs.
You can read more about what's new in TS 2.9 on the [TypeScript blog](https://devblogs.microsoft.com/typescript/announcing-typescript-2-9/#json-imports).

Просмотреть файл

@ -170,7 +170,7 @@ Fenced code blocks and other Markdown elements inside of JSDoc blocks are now sy
![JSDoc Syntax highlighting ](images/1_30/ts-markdown-jsdocs.png)
This inline highlighting better matches VS Code's Markdown rendering of JSDocs for hovers and IntelliSense documentation.
This inline highlighting better matches VS Code's Markdown rendering of JSDoc for hovers and IntelliSense documentation.
## Debugging

Просмотреть файл

@ -393,7 +393,7 @@ Below are some of the new features:
The [Vetur](https://github.com/vuejs/vetur) extension now provides IntelliSense (smart completions) for Vue.js [interpolations](https://vuejs.org/v2/guide/syntax.html#Interpolations).
The completion items are sourced from Vue.js `props`, `data`, `computed`, and `methods` API calls. The source code, along with any JSDocs documentation, are used as completion item descriptions.
The completion items are sourced from Vue.js `props`, `data`, `computed`, and `methods` API calls. The source code, along with any JSDoc documentation, are used as completion item descriptions.
When using child components from parent components, Vetur also offers IntelliSense on the child component's `props`.

Просмотреть файл

@ -131,7 +131,7 @@ The JavaScript in VS Code is powered by TypeScript and the TypeScript version bu
This brings several improvements for JavaScript support:
- The JS Doc support has been improved and many issues have been fixed.
- The JSDoc support has been improved and many issues have been fixed.
- The parser now allows any syntax that the TypeScript parser is capable of recognizing and is part of a JavaScript standards proposal. For example, static class properties are no longer flagged as invalid.
In addition, there are improvements to TypeScript that are also applicable to JavaScript: