Skip to content

Commit

Permalink
docs: add code highlighting to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankiePo authored and YuliaTsareva committed May 16, 2019
1 parent 35b8e4d commit 2c5e390
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -76,7 +76,7 @@ We arrange members of Angular components in the following order:

When a ternary operator contains complex expressions, it becomes difficult to read and understand. In that case we divide it into several lines.

```
```ts
// bad
const defaultQuestionnaire = this.isCompany || this.accountIsBlocked ? defaultQuestionnaireCompany && 'super text' : defaultQuestionnaireIp;

Expand All @@ -94,7 +94,7 @@ const result = isShown ? [] : null;
If a function or a method returns result, we must specify its type.
The only exception is the arrow functions. For them it is not necessary.

```
```ts
class User {
constructor(name: string, age: number) {
}
Expand Down Expand Up @@ -133,7 +133,7 @@ const doSomething = () => {
We separate variable declarations from the previous and subsequent code with an empty string.
But we do not add an empty line before the first variable inside the block.

```
```ts
// bad
const a = 1;
let b = 2;
Expand All @@ -157,7 +157,7 @@ function getStatus() {
Also we separate control statements (for, if, return, etc) from the previous and subsequent code with an empty string.
But we do not add an empty line before the first variable inside the block.

```
```ts
function doSomething(count: number): number {
if (age > 30) {
}
Expand Down

0 comments on commit 2c5e390

Please sign in to comment.