This commit is contained in:
Bill Ticehurst 2018-02-16 11:44:04 -08:00
Родитель df0216f799
Коммит d7e00de81e
52 изменённых файлов: 289 добавлений и 118 удалений

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

@ -1,6 +1,6 @@
# JsDoc support
Programs written in JavaScript and TypeScript can be annotated with (JsDoc comments)[http://usejsdoc.org/index.html]
Programs written in JavaScript and TypeScript can be annotated with [JsDoc comments](http://usejsdoc.org/index.html)
to give type information and quickinfo descriptions of identifiers.
In the following example, the text between the opening `/**` and closing `*/` are considered JsDoc comments.

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

@ -8,7 +8,7 @@
<title>JavaScript &amp; TypeScript documentation for VS 2017 </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="JavaScript &amp; TypeScript documentation for VS 2017 ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Building </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Building ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Building via NuGet </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Building via NuGet ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Building via tsc </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Building via tsc ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Project configuration </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Project configuration ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>MSBuild Configuration </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="MSBuild Configuration ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Using tsconfig.json for project configuration </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Using tsconfig.json for project configuration ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>TypeScript SDK versions </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="TypeScript SDK versions ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Client-side debugging </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Client-side debugging ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Debugging JavaScript &amp; TypeScript </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Debugging JavaScript &amp; TypeScript ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Using Source Maps </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Using Source Maps ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Formatting </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Formatting ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Editor features </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Editor features ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Intellisense </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Intellisense ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Linting </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Linting ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Errors lists and Todo lists </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Errors lists and Todo lists ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Refactoring &amp; Quick fixes </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Refactoring &amp; Quick fixes ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Angular support </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Angular support ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Gulp &amp; Webpack support </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Gulp &amp; Webpack support ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Support for common JavaScript frameworks </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Support for common JavaScript frameworks ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>JSX &amp; React support </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="JSX &amp; React support ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Vue.js support </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Vue.js support ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>JavaScript in Visual Studio 2017 </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="JavaScript in Visual Studio 2017 ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" href="../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Publishing to Azure </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Publishing to Azure ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Node.js developing in Visual Studio </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Node.js developing in Visual Studio ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>The Node.js interactive window </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="The Node.js interactive window ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>npm and package management </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="npm and package management ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Node.js requirements </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Node.js requirements ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Running tasks in Node.js </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Running tasks in Node.js ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Unit testing in Node.js </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Unit testing in Node.js ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>ASP.NET </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="ASP.NET ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../../favicon.ico">
<link rel="stylesheet" href="../../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>ASP.NET Core </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="ASP.NET Core ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../../favicon.ico">
<link rel="stylesheet" href="../../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>ASP.NET overview </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="ASP.NET overview ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../../favicon.ico">
<link rel="stylesheet" href="../../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Cordova projects </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Cordova projects ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Lots of stuff about projects </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Lots of stuff about projects ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Node.js </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Node.js ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Open folder </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Open folder ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Universal Windows Projects and JavaScript </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Universal Windows Projects and JavaScript ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Troubleshooting </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Troubleshooting ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">
@ -266,11 +266,12 @@ with Administrative rights, and run the following commands:</p>
<ol>
<li><code>SET VSEXE=%VSINSTALLDIR%Common7\IDE\devenv.exe</code></li>
<li><code>SET ETWPROV=*TypeScriptEventSource,*Microsoft-VisualStudio-Common</code></li>
<li><code>PerfView -KernelEvents:FileIOInit,ThreadTime -Providers:%ETWPROV% run &quot;%VSEXE%&quot;</code></li>
<li><code>PerfView -KernelEvents:FileIOInit,ThreadTime -Providers:%ETWPROV% -CircularMB:4096 -BufferSizeMB:256 run &quot;%VSEXE%&quot;</code></li>
</ol>
<p>Visual Studio should launch. Reproduce the issue, then stop the PerfView trace. The zip file created
contains detailed logging of file access, asynchronous tasks, Visual Studio internal events, and events
from the TypeScript/JavaScript language service.</p>
<p>Visual Studio should launch. Reproduce the issue, then stop the PerfView trace by closing Visual Studio
and allowing the trace to finish packaging. Do not hit Cancel in PerfView, as this will make the trace unusable.
The zip file created contains detailed logging of file access, asynchronous tasks, Visual Studio internal
events, and events from the TypeScript/JavaScript language service.</p>
<div class="CAUTION"><h5>Caution</h5><p>The log file created can be extremely large - in the order of hundreds of megabytes per minute - and
contains system-wide details including call-stacks, file access, etc. Ensure you have sufficient
disk space, stop logging promptly after reproducing the problem, and do not share the trace if it may

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

@ -8,7 +8,7 @@
<title>The JavaScript language service disabled warning </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="The JavaScript language service disabled warning ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>NewtonSoft.Json versioning issues </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="NewtonSoft.Json versioning issues ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Type checking JavaScript </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Type checking JavaScript ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Automatic Type Acquisition </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Automatic Type Acquisition ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title> and DefinitelyTyped </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content=" and DefinitelyTyped ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>Type definitions and type checking </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Type definitions and type checking ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">

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

@ -8,7 +8,7 @@
<title>JsDoc support </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="JsDoc support ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">
@ -69,7 +69,154 @@
<article class="content wrap" id="_content" data-uid="">
<h1 id="jsdoc-support">JsDoc support</h1>
<p>TODO</p>
<p>Programs written in JavaScript and TypeScript can be annotated with <a href="http://usejsdoc.org/index.html">JsDoc comments</a>
to give type information and quickinfo descriptions of identifiers.</p>
<p>In the following example, the text between the opening <code>/**</code> and closing <code>*/</code> are considered JsDoc comments.</p>
<pre><code class="lang-js">/**
* Creates a new animal object.
* @param {string} name The name of the new animal.
* @param {number} weight
* @param {&quot;cat&quot; | &quot;dog&quot;} kind
* @return {{name: string, weight: number, kind: &quot;cat&quot; | &quot;dog&quot;}} A brand new animal!
*/
function createAnimal(name, weight, kind)
{
// ...
}
</code></pre><p>As you can see, we can prefix sections in JsDoc with terms such as <code>@param</code> and <code>@return</code> to describe the behavior of the <code>createAnimal</code> function.
In JsDoc, terms beginning with <code>@</code> have special meanings, and are called <em>tags</em>. The text between curly braces are descriptions of <em>types</em>,
which can be used by the developer to check that they are using a variable correctly &mdash; they should precede the <em>name</em> of the construct being described, if applicable.
In the example above, knowing that <code>weight</code> is a number can inform the developer to avoid calling <code>weight.length</code>.
Moreover, if the result of <code>createAnimal</code> is assigned to a variable, the return type of createAnimal propagates to the assigned value.</p>
<p>Both Jsdoc and TypeScript type annotations are supported. For example, <code>kind</code> is described as a union of string literals using TypeScript syntax.</p>
<p>Finally, the text spans before the first tag and after parameter names are <em>descriptions</em>, which shows up as part of quickinfo anytime you hover over a construct that is documented.</p>
<p><img src="../../images/jsdoc-quickinfo.png" width="1000px"></p>
<p>and while filling in the paramaters in a function call.</p>
<p><img src="../../images/jsdoc-param.png" width="1000px"></p>
<p>Different constructs in JavaScript can use different forms of documentation, as described below.</p>
<p>Visual Studio offers a rich editing experience inside JsDoc comments. The editor offers auto-completion on tags, names, and types as well as auto-indentation. You can use F12 and Shift+F12 for Go-to-definition and Find-All-References, respectively, as well hovering for quickinfo.</p>
<h2 id="supported-tags">Supported Tags</h2>
<p>Any tag may be used for documentation, but Visual Studio treats some tags specially to improve the editor&#39;s ability to catch errors and help with refactoring.
The following tags are handled specially. Each tag is followed by a description and example.</p>
<ul>
<li><code>@param</code> &mdash; describes a parameter to a function. Type annotations and descriptions are optional.</li>
</ul>
<pre><code class="lang-ts">/**
* Repeats a string a certain number of times.
* Also: the future is bright and consists of native string repetition:
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat
*
* @param {string} string String to repeat
* @param {number} times Number of times to repeat string. Integer.
* @see http://jsperf.com/string-repeater/2
*/
function repeatString(string, times) {
if (times === 1) {
return string;
}
if (times &lt; 0) { throw new Error(); }
var repeated = &#39;&#39;;
while (times) {
if (times &amp; 1) {
repeated += string;
}
if (times &gt;&gt;= 1) {
string += string;
}
}
return repeated;
}
</code></pre><ul>
<li><code>@return</code> &mdash; describes the return value of a function. Type annotations and descriptions are optional.</li>
</ul>
<pre><code class="lang-ts">/**
* Determine if the string ends with the specified substring.
*
* @param {string} haystack String to search in
* @param {string} needle String to search for
* @return {boolean}
*/
function endsWith(haystack, needle) {
return haystack.slice(-needle.length) === needle;
}
</code></pre><ul>
<li><code>@class</code> &mdash; tells Visual Studio to treat the next function as a constructor. (Only available in JavaScript files)</li>
</ul>
<pre><code class="lang-ts">var Cell = /** @class */ (function () {
function Cell() {
}
return Cell;
}());
</code></pre><ul>
<li><code>@augments</code> and <code>@extends</code> &mdash; if the next construct is a class declaration, specifies which class the upcoming declaration extends. Note that <code>@augments</code> and <code>@extends</code> are synonyms.
The following advanced example shows how to use <code>@augments</code> to instantiate a generic class from a TypeScript file</li>
</ul>
<pre><code class="lang-ts">// @Filename: declarations.d.ts
class Thing&lt;T&gt; {
mine: T;
}
// @Filename: dummy.js
/**
* @augments {Thing&lt;string&gt;}
*/
class MyStringThing extends Thing {
constructor() {
// x is a string!
var x = this.mine;
}
}
</code></pre><ul>
<li><code>@template</code> &mdash; used to specify type parameters for the following function (c.f. generic programming)</li>
</ul>
<pre><code class="lang-ts">/**
* @param {T} a
* @template T
*/
function f(a) {
return () =&gt; a
}
let n = f(1)();
</code></pre><ul>
<li><code>@type</code> &mdash; declares the type of the next construct:</li>
</ul>
<pre><code class="lang-ts">/** @type {{key: &quot;value&quot;}} */
var x = JSON.parse(JSON.stringify({key: &quot;value&quot;}));
</code></pre><ul>
<li><code>@typedef</code> &mdash; Typedef tags can be used to declare types referenced in other JsDoc comments.
If a type is specified inline (in the same style as <code>@param</code>), that describes the shape of the <code>@typedef</code>&#39;d name.
Alternatively, A JsDoc beginning with a <code>@typedef</code> tag and name can be followed by <code>@property</code> and <code>@member</code> tags to describe the shape of the named type.</li>
</ul>
<pre><code class="lang-ts">/**
* @typedef {{foo: number}} Foo1
*/
/**
* @typedef Foo2
* @property {number} foo
*/
/** @type {Foo1} */
const x = { foo: 0 };
</code></pre><ul>
<li><code>@property</code> and <code>@member</code> &mdash; used to describe properties as part of a <code>@typedef</code> type declaration. See above for an example.</li>
</ul>
<h2 id="type-syntax">Type Syntax</h2>
<p>Visual Studio supports both <a href="http://usejsdoc.org/tags-type.html#overview">JsDoc</a> and <a href="https://www.typescriptlang.org/docs/handbook/basic-types.html">TypeScript</a> syntax for type annotations. Since TypeScript <a href="https://www.typescriptlang.org/docs/handbook/advanced-types.html">has a more expressive type system</a>, we recommend using the latter.</p>
<h2 id="jsdoc-scaffolding-support">JsDoc Scaffolding Support</h2>
<p>If you would like to add JsDoc comments to an existing javascript construct, typing <code>/**</code> in front of a construct in Visual Studio will trigger scaffolding generation, which will stub out
JsDoc for the next construct:</p>
<p>Scaffolding-generation is supported for the following constructs:</p>
<ul>
<li>function declarations</li>
<li>method declarations</li>
<li>constructor declarations</li>
<li>method signatures</li>
<li>variable statements</li>
<li>most property assignments &mdash; module import and export statements are excluded</li>
</ul>
<h2 id="bugs">Bugs</h2>
<p>Known issues and feature suggestions for JSDoc-related issues are tracked <a href="https://github.com/Microsoft/TypeScript/labels/Domain%3A%20JSDoc">here</a>. If you run into an issue with JsDoc, please first search for and upvote an existing issue. If none exists, please file a new issue.</p>
</article>
</div>

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

@ -8,7 +8,7 @@
<title>Docs </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Docs ">
<meta name="generator" content="docfx 2.27.0.0">
<meta name="generator" content="docfx 2.31.0.0">
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="styles/docfx.vendor.css">

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

@ -1,6 +1,6 @@
{
"homepages": [],
"source_base_path": "C:/github/jsdocs",
"source_base_path": "C:/src/github/jsdocs",
"xrefmap": "xrefmap.yml",
"files": [
{
@ -9,7 +9,7 @@
"output": {
".html": {
"relative_path": "README.html",
"hash": "saozrykizL1kRGLZ1mmn/Q=="
"hash": "jWj0XP8c/cYADsp2G96C2g=="
}
},
"is_incremental": true,
@ -21,7 +21,7 @@
"output": {
".html": {
"relative_path": "articles/build/index.html",
"hash": "uqYt2sFOGBo0/VwV9kOLvg=="
"hash": "Ws22mg6PZQiCZObtG7Jc2g=="
}
},
"is_incremental": true,
@ -33,10 +33,10 @@
"output": {
".html": {
"relative_path": "articles/build/nuget.html",
"hash": "qlsTXWBtXIamqqUBcHPRPA=="
"hash": "0nkBgodwHvxbkL1whiSexw=="
}
},
"is_incremental": false,
"is_incremental": true,
"version": ""
},
{
@ -45,7 +45,7 @@
"output": {
".html": {
"relative_path": "articles/build/tsc.html",
"hash": "DgCC+Wqh4CLuV8KfaR9nCQ=="
"hash": "vT+9RTQR4cYXAdGKBgW33g=="
}
},
"is_incremental": true,
@ -57,7 +57,7 @@
"output": {
".html": {
"relative_path": "articles/configuration/index.html",
"hash": "jqWfLuw6jiWjSXAq0Y963w=="
"hash": "opAi35xpdlAhO3TBL6R02Q=="
}
},
"is_incremental": true,
@ -69,10 +69,10 @@
"output": {
".html": {
"relative_path": "articles/configuration/msbuild.html",
"hash": "Lt8iDc4h+I40hPOzZt9Rhw=="
"hash": "5NjsAA/fw1toKpjptOvpaw=="
}
},
"is_incremental": false,
"is_incremental": true,
"version": ""
},
{
@ -81,7 +81,7 @@
"output": {
".html": {
"relative_path": "articles/configuration/tsconfig.html",
"hash": "EdmHyXGSvI1xO9fNAmOKAA=="
"hash": "hwo7u9p5aLaCVC1WCRn2jg=="
}
},
"is_incremental": true,
@ -93,7 +93,7 @@
"output": {
".html": {
"relative_path": "articles/configuration/versioning.html",
"hash": "RZBMtHJHpOPL/E/kZ9CPzg=="
"hash": "USsvClhLj9kfQVUMdGttqA=="
}
},
"is_incremental": true,
@ -105,7 +105,7 @@
"output": {
".html": {
"relative_path": "articles/debugging/clientSideDebugging.html",
"hash": "UQLf84avaxnJOZ4znENmvA=="
"hash": "SFG+L59xTv4uAEjVO0+Cfw=="
}
},
"is_incremental": true,
@ -117,7 +117,7 @@
"output": {
".html": {
"relative_path": "articles/debugging/index.html",
"hash": "VJs/6Abb92GQ4gngDmFChQ=="
"hash": "kGZS4gh6xBzRDI4xHcLWzg=="
}
},
"is_incremental": true,
@ -129,7 +129,7 @@
"output": {
".html": {
"relative_path": "articles/debugging/sourcemaps.html",
"hash": "ZeSNHW5C0nvYxkY36Cyv0w=="
"hash": "DRO9V+e9ZcF/2w1imPid2Q=="
}
},
"is_incremental": true,
@ -141,7 +141,7 @@
"output": {
".html": {
"relative_path": "articles/editor/formatting.html",
"hash": "AVjav9cVVCcFuBpkpMsYqQ=="
"hash": "3f0bMhdWxT7+lgG8GIqL/g=="
}
},
"is_incremental": true,
@ -153,7 +153,7 @@
"output": {
".html": {
"relative_path": "articles/editor/index.html",
"hash": "X2O2xoYp2CM4jbwqW40GNw=="
"hash": "yjT7YaM9n0wJHVdAA1m6lQ=="
}
},
"is_incremental": true,
@ -165,7 +165,7 @@
"output": {
".html": {
"relative_path": "articles/editor/intellisense.html",
"hash": "8Ip1os75XIggNcU5UtNJjA=="
"hash": "taHgU12zAZQrWa3VNjzkPQ=="
}
},
"is_incremental": true,
@ -177,7 +177,7 @@
"output": {
".html": {
"relative_path": "articles/editor/linting.html",
"hash": "Ox8VLOK8fDJWDE82XWqHnA=="
"hash": "ukX5+YMwioArofLBuRs/ww=="
}
},
"is_incremental": true,
@ -189,7 +189,7 @@
"output": {
".html": {
"relative_path": "articles/editor/lists.html",
"hash": "fPHW+nNJdAEaIQA1E3oagg=="
"hash": "/dfJNdDnJXOsPfwYi9uZaA=="
}
},
"is_incremental": true,
@ -201,10 +201,10 @@
"output": {
".html": {
"relative_path": "articles/editor/refactoring.html",
"hash": "2+/HJhbCYkTy5y4FxYuZdg=="
"hash": "qC81ba4VJXyhIt3WUPFxFw=="
}
},
"is_incremental": false,
"is_incremental": true,
"version": ""
},
{
@ -213,7 +213,7 @@
"output": {
".html": {
"relative_path": "articles/frameworks/angular.html",
"hash": "xQkq4FoFxzEMe/RLtAx6qg=="
"hash": "80SL2H0I0IWHR0FZzEzdtQ=="
}
},
"is_incremental": true,
@ -225,7 +225,7 @@
"output": {
".html": {
"relative_path": "articles/frameworks/gulpwebpack.html",
"hash": "3DUzQ6HIwt3UI2OHahSXrw=="
"hash": "5L47DEKJJlumHl32rqM/Fw=="
}
},
"is_incremental": true,
@ -237,7 +237,7 @@
"output": {
".html": {
"relative_path": "articles/frameworks/index.html",
"hash": "5zqoELdA5n5xwqETyP3eAA=="
"hash": "Ek2bL/hkDk1VGzDK7cUiDw=="
}
},
"is_incremental": true,
@ -249,7 +249,7 @@
"output": {
".html": {
"relative_path": "articles/frameworks/jsx.html",
"hash": "J/3fEpiyniuz8GWb5/k/rg=="
"hash": "tXfstJgtTJZMYcKy5ws6oQ=="
}
},
"is_incremental": true,
@ -261,7 +261,7 @@
"output": {
".html": {
"relative_path": "articles/frameworks/vue.html",
"hash": "+aaNxCe6LheZ0l89l4H8rg=="
"hash": "TdsVe4nEcAznR5/tJjt87g=="
}
},
"is_incremental": true,
@ -273,10 +273,10 @@
"output": {
".html": {
"relative_path": "articles/index.html",
"hash": "zvFVbSBbWTYJN4uuU40CFg=="
"hash": "Oqtd3H+eqNMHEvXGh2wVUQ=="
}
},
"is_incremental": true,
"is_incremental": false,
"version": ""
},
{
@ -285,7 +285,7 @@
"output": {
".html": {
"relative_path": "articles/nodejs/azure.html",
"hash": "GSR3XCkUT/nbVXOTi6xpdw=="
"hash": "BdFKusFjIntfIg6cmDMQTw=="
}
},
"is_incremental": true,
@ -297,7 +297,7 @@
"output": {
".html": {
"relative_path": "articles/nodejs/index.html",
"hash": "vFk9nKvKM+pq9l81TPHZrA=="
"hash": "EyLQfR9Q9pumdwFHeLI6Aw=="
}
},
"is_incremental": true,
@ -309,7 +309,7 @@
"output": {
".html": {
"relative_path": "articles/nodejs/interactivewindow.html",
"hash": "d/NzzqEBjKIJCcXApAQk3Q=="
"hash": "/nJTLLAgrErv2W9sP92JYw=="
}
},
"is_incremental": true,
@ -321,7 +321,7 @@
"output": {
".html": {
"relative_path": "articles/nodejs/npm.html",
"hash": "PmokqTNz2UzqpQ7wUFlWig=="
"hash": "8zX3yT8NsXSVg/BfZ9lbGw=="
}
},
"is_incremental": true,
@ -333,7 +333,7 @@
"output": {
".html": {
"relative_path": "articles/nodejs/requirements.html",
"hash": "sPzuiLlVlXva0ALubtWatA=="
"hash": "+GWCraVJAE5QN38VbRandw=="
}
},
"is_incremental": true,
@ -345,7 +345,7 @@
"output": {
".html": {
"relative_path": "articles/nodejs/taskexplorer.html",
"hash": "UszliNrhL0yhEs3XcTX1lA=="
"hash": "LkUHv+EKnPm77aQua1j68w=="
}
},
"is_incremental": true,
@ -357,7 +357,7 @@
"output": {
".html": {
"relative_path": "articles/nodejs/unittesting.html",
"hash": "ycI6NKDuwdpip2ondmwScA=="
"hash": "8UNXuby+dV61+skRCIOqdA=="
}
},
"is_incremental": true,
@ -369,7 +369,7 @@
"output": {
".html": {
"relative_path": "articles/projects/aspnet/aspnetclassic.html",
"hash": "v5CJeezn8kgqPRdArSwoKw=="
"hash": "ADJ5zAOr5paYXXb8ZwafWw=="
}
},
"is_incremental": true,
@ -381,7 +381,7 @@
"output": {
".html": {
"relative_path": "articles/projects/aspnet/aspnetcore.html",
"hash": "s4a1NvzK+jdDB+3Ac8QM/A=="
"hash": "31v8WDfAr0Y2Sr3O3tu1Mg=="
}
},
"is_incremental": true,
@ -393,7 +393,7 @@
"output": {
".html": {
"relative_path": "articles/projects/aspnet/index.html",
"hash": "LthF+0slwJB/PONNTqMMQQ=="
"hash": "OZ3/c/arPfMxy+WWc27zPQ=="
}
},
"is_incremental": true,
@ -405,7 +405,7 @@
"output": {
".html": {
"relative_path": "articles/projects/cordova.html",
"hash": "qZHd1pSM7CC025ysY2Oh6Q=="
"hash": "LQ7VHNczASXyBMz1FCUW+g=="
}
},
"is_incremental": true,
@ -417,7 +417,7 @@
"output": {
".html": {
"relative_path": "articles/projects/index.html",
"hash": "eboHdfVRTl3xlhbG3u/Bmg=="
"hash": "tIAus+Eo2hn882C1YdSklQ=="
}
},
"is_incremental": true,
@ -429,7 +429,7 @@
"output": {
".html": {
"relative_path": "articles/projects/nodejs.html",
"hash": "fxm6sRUNKJ5yc5ZjzUefMw=="
"hash": "H2nTJ1EtfRcAi5zH4EfAQw=="
}
},
"is_incremental": true,
@ -441,7 +441,7 @@
"output": {
".html": {
"relative_path": "articles/projects/openfolder.html",
"hash": "Y1i6RWe8EJdmxRSQh45XMQ=="
"hash": "v/eKIj2PPfXE9pv4JRxK0A=="
}
},
"is_incremental": true,
@ -453,7 +453,7 @@
"output": {
".html": {
"relative_path": "articles/projects/uwp.html",
"hash": "kTTTF7eb2CrLTBPZoD6Vqg=="
"hash": "Z8BaFZ87et96rSi7e67jGA=="
}
},
"is_incremental": true,
@ -477,7 +477,7 @@
"output": {
".html": {
"relative_path": "articles/troubleshooting/index.html",
"hash": "60j1ZD62D381aIgHePpdsA=="
"hash": "I0Gobx+B7lgdwOL15B6Pog=="
}
},
"is_incremental": true,
@ -489,7 +489,7 @@
"output": {
".html": {
"relative_path": "articles/troubleshooting/jsdisabled.html",
"hash": "WZqXn7+Ory6V2CwDUQcCAw=="
"hash": "w5NhFldwiRlNdGRt3MYHzw=="
}
},
"is_incremental": true,
@ -501,7 +501,7 @@
"output": {
".html": {
"relative_path": "articles/troubleshooting/newtonsoft.html",
"hash": "Lq8o6qjqKgy0XlDJmYpklw=="
"hash": "81/DjQ88JoygEy2D0x9nfw=="
}
},
"is_incremental": true,
@ -513,7 +513,7 @@
"output": {
".html": {
"relative_path": "articles/types/allowjs.html",
"hash": "XBz4UxZDAcfVxysZAdnpew=="
"hash": "0DRU3KIycupvfdfP/MDvPg=="
}
},
"is_incremental": true,
@ -525,7 +525,7 @@
"output": {
".html": {
"relative_path": "articles/types/ata.html",
"hash": "K/Cp+Ho4Jxvn/MDHkEIHhg=="
"hash": "5MUnRuEpXIOT4w6XEroDhg=="
}
},
"is_incremental": true,
@ -537,7 +537,7 @@
"output": {
".html": {
"relative_path": "articles/types/attypes.html",
"hash": "kwLv8PvlyaXa0KK/QWrDUQ=="
"hash": "N/Pr0YJSths9V8WKiIbaqw=="
}
},
"is_incremental": true,
@ -549,7 +549,7 @@
"output": {
".html": {
"relative_path": "articles/types/index.html",
"hash": "k+ZzrVHSz4e1J80FGg3gMQ=="
"hash": "a6akYoS18AJTG97tJpGW7g=="
}
},
"is_incremental": true,
@ -561,10 +561,10 @@
"output": {
".html": {
"relative_path": "articles/types/jsdoc.html",
"hash": "sTFiBiXLrfxrcttOeMRY2g=="
"hash": "kRh7mbuihrTTwQ79qAAEHA=="
}
},
"is_incremental": true,
"is_incremental": false,
"version": ""
},
{
@ -578,6 +578,28 @@
"is_incremental": false,
"version": ""
},
{
"type": "Resource",
"source_relative_path": "images/jsdoc-param.png",
"output": {
"resource": {
"relative_path": "images/jsdoc-param.png"
}
},
"is_incremental": false,
"version": ""
},
{
"type": "Resource",
"source_relative_path": "images/jsdoc-quickinfo.png",
"output": {
"resource": {
"relative_path": "images/jsdoc-quickinfo.png"
}
},
"is_incremental": false,
"version": ""
},
{
"type": "Resource",
"source_relative_path": "images/jslsdisabledpopup.png",
@ -815,7 +837,7 @@
"output": {
".html": {
"relative_path": "index.html",
"hash": "3MAfwxmT5jQvh3WXm0YsIg=="
"hash": "RkSvwcTOB7YNZXAuC+bTTw=="
}
},
"is_incremental": true,
@ -846,14 +868,14 @@
"details": "Processor ResourceDocumentProcessor cannot suppport incremental build because the processor doesn't implement ISupportIncrementalDocumentProcessor interface.",
"incrementalPhase": "build"
},
"ConceptualDocumentProcessor": {
"can_incremental": true,
"incrementalPhase": "build"
},
"TocDocumentProcessor": {
"can_incremental": false,
"details": "Processor TocDocumentProcessor cannot suppport incremental build because the processor doesn't implement ISupportIncrementalDocumentProcessor interface.",
"incrementalPhase": "build"
},
"ConceptualDocumentProcessor": {
"can_incremental": true,
"incrementalPhase": "build"
}
}
},

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

@ -470,7 +470,7 @@ $(function () {
function filterNavItem(name, text) {
if (!text) return true;
if (name.toLowerCase().indexOf(text.toLowerCase()) > -1) return true;
if (name && name.toLowerCase().indexOf(text.toLowerCase()) > -1) return true;
return false;
}
});

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

2
docs/styles/lunr.min.js поставляемый

Различия файлов скрыты, потому что одна или несколько строк слишком длинны