documentation changes based on review

Co-Authored-By: shati-patel <42641846+shati-patel@users.noreply.github.com>
This commit is contained in:
Erik Krogh Kristensen
2019-10-04 14:42:16 +02:00
committed by GitHub
parent c8d60c9e2a
commit b741a65e9b
3 changed files with 8 additions and 8 deletions

View File

@@ -8,10 +8,10 @@ In TypeScript the keywords <code>constructor</code> and <code>new</code> for
member declarations are used to declare constructors in classes and interfaces
respectively.
However, a member declaration with the name <code>new</code> in an interface
or <code>constructor</code> in a class, will declare ordinary methods named
<code>new</code> or <code>constructor</code> rather than constructors.
or <code>constructor</code> in a class, will declare an ordinary method named
<code>new</code> or <code>constructor</code> rather than a constructor.
Similarly, the keyword <code>function</code> is used to declare functions in
some contexts, however, using the name <code>function</code> for a class
some contexts. However, using the name <code>function</code> for a class
or interface member declaration declares a method named <code>function</code>.
</p>
@@ -48,8 +48,8 @@ in the first place.
</example>
<references>
<li>TypeScript specification: <a href="https://github.com/microsoft/TypeScript/blob/master/doc/spec.md#3.8.9">Constructor Type Literals</a></li>
<li>TypeScript specification: <a href="https://github.com/microsoft/TypeScript/blob/master/doc/spec.md#8.3.1">Constructor Parameters</a></li>
<li>TypeScript specification: <a href="https://github.com/microsoft/TypeScript/blob/master/doc/spec.md#3.8.9">Constructor Type Literals</a>.</li>
<li>TypeScript specification: <a href="https://github.com/microsoft/TypeScript/blob/master/doc/spec.md#8.3.1">Constructor Parameters</a>.</li>
</references>
</qhelp>

View File

@@ -1,6 +1,6 @@
/**
* @name Suspicious method name declaration
* @description A method declaration with a name that would be a special keyword in another
* @description A method declaration with a name that is a special keyword in another
* context is suspicious.
* @kind problem
* @problem.severity warning