Add documentation to the helpers module.

This commit is contained in:
Spencer Ofwiti
2021-05-11 14:34:23 +03:00
parent c9f73899c3
commit e0c045cdfa
37 changed files with 1403 additions and 585 deletions

View File

@@ -68,6 +68,18 @@
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Custom provider that defines how form controls behave with regards to displaying error messages.</p>
</div>
<dl class="tsd-comment-tags">
<dt>implements</dt>
<dd><p>ErrorStateMatcher</p>
</dd>
</dl>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
@@ -131,19 +143,31 @@
<aside class="tsd-sources">
<p>Implementation of ErrorStateMatcher.isErrorState</p>
<ul>
<li>Defined in src/app/_helpers/custom-error-state-matcher.ts:5</li>
<li>Defined in src/app/_helpers/custom-error-state-matcher.ts:18</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Checks whether an invalid input has been made and an error should be made.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>control: <span class="tsd-signature-type">FormControl</span></h5>
<div class="tsd-comment tsd-typography">
<p>Tracks the value and validation status of an individual form control.</p>
</div>
</li>
<li>
<h5>form: <span class="tsd-signature-type">FormGroupDirective</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">NgForm</span></h5>
<div class="tsd-comment tsd-typography">
<p>Binding of an existing FormGroup to a DOM element.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>true - If an invalid input has been made to the form control.</p>
</li>
</ul>
</section>

View File

@@ -68,6 +68,13 @@
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Provides methods to perform custom validation to form inputs.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
@@ -125,13 +132,21 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_helpers/custom.validator.ts:4</li>
<li>Defined in src/app/_helpers/custom.validator.ts:13</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Sets errors to the confirm password input field if it does not match with the value in the password input field.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>control: <span class="tsd-signature-type">AbstractControl</span></h5>
<div class="tsd-comment tsd-typography">
<p>The control object of the form being validated.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
@@ -148,19 +163,31 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_helpers/custom.validator.ts:12</li>
<li>Defined in src/app/_helpers/custom.validator.ts:28</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Sets errors to a form field if it does not match with the regular expression given.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>regex: <span class="tsd-signature-type">RegExp</span></h5>
<div class="tsd-comment tsd-typography">
<p>The regular expression to match with the form field.</p>
</div>
</li>
<li>
<h5>error: <span class="tsd-signature-type">ValidationErrors</span></h5>
<div class="tsd-comment tsd-typography">
<p>Defines the map of errors to return from failed validation checks.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">ValidationErrors</span></h4>
<p>The map of errors returned from failed validation checks.</p>
</li>
</ul>
</section>

View File

@@ -68,6 +68,13 @@
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Provides a hook for centralized exception handling.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
@@ -121,16 +128,27 @@
<aside class="tsd-sources">
<p>Overrides ErrorHandler.constructor</p>
<ul>
<li>Defined in src/app/_helpers/global-error-handler.ts:18</li>
<li>Defined in src/app/_helpers/global-error-handler.ts:42</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Initialization of the Global Error Handler.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>loggingService: <a href="app__services_logging_service.loggingservice.html" class="tsd-signature-type" data-tsd-kind="Class">LoggingService</a></h5>
<div class="tsd-comment tsd-typography">
<p>A service that provides logging capabilities.</p>
</div>
</li>
<li>
<h5>router: <span class="tsd-signature-type">Router</span></h5>
<div class="tsd-comment tsd-typography">
<p>A service that provides navigation among views and URL manipulation capabilities.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="app__helpers_global_error_handler.globalerrorhandler.html" class="tsd-signature-type" data-tsd-kind="Class">GlobalErrorHandler</a></h4>
@@ -146,9 +164,14 @@
<div class="tsd-signature tsd-kind-icon">sentences<wbr>For<wbr>Warning<wbr>Logging<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_helpers/global-error-handler.ts:18</li>
<li>Defined in src/app/_helpers/global-error-handler.ts:42</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>An array of sentence sections that denote warnings.</p>
</div>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
@@ -164,13 +187,21 @@
<aside class="tsd-sources">
<p>Overrides ErrorHandler.handleError</p>
<ul>
<li>Defined in src/app/_helpers/global-error-handler.ts:27</li>
<li>Defined in src/app/_helpers/global-error-handler.ts:62</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Handles different types of errors.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>error: <span class="tsd-signature-type">Error</span></h5>
<div class="tsd-comment tsd-typography">
<p>An error objects thrown when a runtime errors occurs.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
@@ -187,16 +218,25 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_helpers/global-error-handler.ts:67</li>
<li>Defined in src/app/_helpers/global-error-handler.ts:89</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Checks if an error is of type warning.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>errorTraceString: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>A description of the error and it&#39;s stack trace.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>true - If the error is of type warning.</p>
</li>
</ul>
</section>
@@ -210,13 +250,21 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_helpers/global-error-handler.ts:47</li>
<li>Defined in src/app/_helpers/global-error-handler.ts:109</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Write appropriate logs according to the type of error.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>error: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>An error objects thrown when a runtime errors occurs.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>

View File

@@ -68,6 +68,13 @@
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>A generalized http response error.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
@@ -124,16 +131,27 @@
<aside class="tsd-sources">
<p>Overrides Error.constructor</p>
<ul>
<li>Defined in src/app/_helpers/global-error-handler.ts:8</li>
<li>Defined in src/app/_helpers/global-error-handler.ts:16</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Initialize the HttpError class.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>message: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The message given by the error.</p>
</div>
</li>
<li>
<h5>status: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>The status code given by the error.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="app__helpers_global_error_handler.httperror.html" class="tsd-signature-type" data-tsd-kind="Class">HttpError</a></h4>
@@ -182,9 +200,14 @@
<div class="tsd-signature tsd-kind-icon">status<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_helpers/global-error-handler.ts:8</li>
<li>Defined in src/app/_helpers/global-error-handler.ts:16</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The error&#39;s status code.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external">
<a name="preparestacktrace" class="tsd-anchor"></a>

View File

@@ -68,6 +68,19 @@
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Intercepts HTTP requests and handles some specified requests internally.
Provides a backend that can handle requests for certain data items.</p>
</div>
<dl class="tsd-comment-tags">
<dt>implements</dt>
<dd><p>HttpInterceptor</p>
</dd>
</dl>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
@@ -131,19 +144,31 @@
<aside class="tsd-sources">
<p>Implementation of HttpInterceptor.intercept</p>
<ul>
<li>Defined in src/app/_helpers/mock-backend.ts:240</li>
<li>Defined in src/app/_helpers/mock-backend.ts:268</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Intercepts HTTP requests.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>request: <span class="tsd-signature-type">HttpRequest</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h5>
<div class="tsd-comment tsd-typography">
<p>An outgoing HTTP request with an optional typed body.</p>
</div>
</li>
<li>
<h5>next: <span class="tsd-signature-type">HttpHandler</span></h5>
<div class="tsd-comment tsd-typography">
<p>The next HTTP handler or the outgoing request dispatcher.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Observable</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">HttpEvent</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>The response from the resolved request.</p>
</li>
</ul>
</section>