Skip to content

Commit c37e26d

Browse files
chore: drop store links
1 parent 2dd3e2a commit c37e26d

File tree

8 files changed

+25
-42
lines changed

8 files changed

+25
-42
lines changed

content/controllers.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,6 @@ export class AppModule {}
512512

513513
We attached the metadata to the module class using the `@Module()` decorator, and Nest can now easily reflect which controllers have to be mounted.
514514

515-
<app-banner-shop></app-banner-shop>
516-
517515
#### Library-specific approach
518516

519517
So far we've discussed the Nest standard way of manipulating responses. The second way of manipulating the response is to use a library-specific [response object](https://expressjs.com/en/api.html#res). In order to inject a particular response object, we need to use the `@Res()` decorator. To show the differences, let's rewrite the `CatsController` to the following:

content/fundamentals/dynamic-modules.md

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The challenge is that the configuration module itself, since it's generic (simil
6767

6868
In other words, dynamic modules provide an API for importing one module into another, and customizing the properties and behavior of that module when it is imported, as opposed to using the static bindings we've seen so far.
6969

70-
<app-banner-shop></app-banner-shop>
70+
<app-banner-devtools></app-banner-devtools>
7171

7272
#### Config module example
7373

@@ -431,18 +431,17 @@ There are edge-cases when your module may need to take extra options that determ
431431
In such cases, the `ConfigurableModuleBuilder#setExtras` method can be used. See the following example:
432432

433433
```typescript
434-
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN } =
435-
new ConfigurableModuleBuilder<ConfigModuleOptions>()
436-
.setExtras(
437-
{
438-
isGlobal: true,
439-
},
440-
(definition, extras) => ({
441-
...definition,
442-
global: extras.isGlobal,
443-
}),
444-
)
445-
.build();
434+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN } = new ConfigurableModuleBuilder<ConfigModuleOptions>()
435+
.setExtras(
436+
{
437+
isGlobal: true,
438+
},
439+
(definition, extras) => ({
440+
...definition,
441+
global: extras.isGlobal,
442+
}),
443+
)
444+
.build();
446445
```
447446

448447
In the example above, the first argument passed into the `setExtras` method is an object containing default values for the "extra" properties. The second argument is a function that takes an auto-generated module definitions (with `provider`, `exports`, etc.) and `extras` object which represents extra properties (either specified by the consumer or defaults). The returned value of this function is a modified module definition. In this specific example, we're taking the `extras.isGlobal` property and assigning it to the `global` property of the module definition (which in turn determines whether a module is global or not, read more [here](/modules#dynamic-modules)).
@@ -466,9 +465,7 @@ However, since `isGlobal` is declared as an "extra" property, it won't be availa
466465
```typescript
467466
@Injectable()
468467
export class ConfigService {
469-
constructor(
470-
@Inject(MODULE_OPTIONS_TOKEN) private options: ConfigModuleOptions,
471-
) {
468+
constructor(@Inject(MODULE_OPTIONS_TOKEN) private options: ConfigModuleOptions) {
472469
// "options" object will not have the "isGlobal" property
473470
// ...
474471
}
@@ -482,11 +479,7 @@ The auto-generated static methods (`register`, `registerAsync`, etc.) can be ext
482479
```typescript
483480
import { Module } from '@nestjs/common';
484481
import { ConfigService } from './config.service';
485-
import {
486-
ConfigurableModuleClass,
487-
ASYNC_OPTIONS_TYPE,
488-
OPTIONS_TYPE,
489-
} from './config.module-definition';
482+
import { ConfigurableModuleClass, ASYNC_OPTIONS_TYPE, OPTIONS_TYPE } from './config.module-definition';
490483

491484
@Module({
492485
providers: [ConfigService],
@@ -512,10 +505,5 @@ export class ConfigModule extends ConfigurableModuleClass {
512505
Note the use of `OPTIONS_TYPE` and `ASYNC_OPTIONS_TYPE` types that must be exported from the module definition file:
513506

514507
```typescript
515-
export const {
516-
ConfigurableModuleClass,
517-
MODULE_OPTIONS_TOKEN,
518-
OPTIONS_TYPE,
519-
ASYNC_OPTIONS_TYPE,
520-
} = new ConfigurableModuleBuilder<ConfigModuleOptions>().build();
508+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE, ASYNC_OPTIONS_TYPE } = new ConfigurableModuleBuilder<ConfigModuleOptions>().build();
521509
```

content/fundamentals/module-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,4 @@ export class CatsService {
231231

232232
This technique enables you to conditionally instantiate different classes outside of the framework container.
233233

234-
<app-banner-shop></app-banner-shop>
234+
<app-banner-devtools></app-banner-devtools>

content/graphql/resolvers-map.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -581,13 +581,12 @@ Assuming that we use the schema first approach and have enabled the typings gene
581581

582582
```typescript
583583
@@filename(graphql)
584-
export class Author {
584+
export (class Author {
585585
id: number;
586586
firstName?: string;
587587
lastName?: string;
588588
posts?: Post[];
589-
}
590-
589+
})
591590
export class Post {
592591
id: number;
593592
title: string;
@@ -658,7 +657,7 @@ These arguments have the following meanings:
658657
- `info`: an object that contains information about the execution state of the query.
659658
- `args`: an object with the arguments passed into the field in the query.
660659

661-
<app-banner-shop></app-banner-shop>
660+
<app-banner-devtools></app-banner-devtools>
662661

663662
#### Module
664663

content/microservices/basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ async publish() {
322322

323323
The `emit()` method takes two arguments, `pattern` and `payload`. The `pattern`should match one defined in an `@EventPattern()` decorator. The `payload` is an event payload that we want to transmit to the remote microservice. This method returns a **hot `Observable`** (unlike the cold `Observable` returned by `send()`), which means that whether or not you explicitly subscribe to the observable, the proxy will immediately try to deliver the event.
324324

325-
<app-banner-shop></app-banner-shop>
325+
<app-banner-devtools></app-banner-devtools>
326326

327327
#### Scopes
328328

content/openapi/migration-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ The following methods have been added:
3535
- `addSecurity`
3636
- `addSecurityRequirements`
3737

38-
<app-banner-shop></app-banner-shop>
38+
<app-banner-devtools></app-banner-devtools>

content/techniques/configuration.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,6 @@ import { validate } from './env.validation';
457457
export class AppModule {}
458458
```
459459

460-
<app-banner-shop></app-banner-shop>
461-
462460
#### Custom getter functions
463461

464462
`ConfigService` defines a generic `get()` method to retrieve a configuration value by key. We may also add `getter` functions to enable a little more natural coding style:

src/app/homepage/menu/menu.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,10 @@ export class MenuComponent implements OnInit {
288288
isOpened: false,
289289
children: [{ title: 'Who is using Nest?', path: '/discover/companies' }],
290290
},
291-
{
292-
title: 'T-Shirts and Hoodies',
293-
externalUrl: 'https://nestjs.threadless.com/',
294-
},
291+
// {
292+
// title: 'T-Shirts and Hoodies',
293+
// externalUrl: 'https://nestjs.threadless.com/',
294+
// },
295295
{
296296
title: 'Support us',
297297
isOpened: false,

0 commit comments

Comments
 (0)