style(docs-infra): fix docs examples for tslint rule `jsdoc-format` (#38143)

This commit updates the docs examples to be compatible with the
`jsdoc-format` tslint rule.

This is in preparation of updating the docs examples `tslint.json` to
match the one generated for new Angular CLI apps in a future commit.

PR Close #38143
This commit is contained in:
George Kalpakas 2020-07-30 13:03:12 +03:00 committed by Alex Rickabaugh
parent 77f38d3be1
commit 3012a8e71c
5 changed files with 15 additions and 8 deletions

View File

@ -1,3 +1,4 @@
// tslint:disable: jsdoc-format
// #docplaster
// #docregion
// #docregion no-docs, skeleton

View File

@ -2,8 +2,10 @@
import { Directive, ElementRef, Input, OnChanges } from '@angular/core';
@Directive({ selector: '[highlight]' })
/** Set backgroundColor for the attached element to highlight color
* and set the element's customProperty to true */
/**
* Set backgroundColor for the attached element to highlight color
* and set the element's customProperty to true
*/
export class HighlightDirective implements OnChanges {
defaultColor = 'rgb(211, 211, 211)'; // lightgray

View File

@ -13,16 +13,20 @@
import { defer } from 'rxjs';
// #docregion async-data
/** Create async observable that emits-once and completes
* after a JS engine turn */
/**
* Create async observable that emits-once and completes
* after a JS engine turn
*/
export function asyncData<T>(data: T) {
return defer(() => Promise.resolve(data));
}
// #enddocregion async-data
// #docregion async-error
/** Create async observable error that errors
* after a JS engine turn */
/**
* Create async observable error that errors
* after a JS engine turn
*/
export function asyncError<T>(errorObject: any) {
return defer(() => Promise.reject(errorObject));
}