Skip to content

Commit 3148e84

Browse files
wesleygrimesjohnpapa
authored andcommitted
Fix typo in NgRx createReducer snippet
lgtm
1 parent a638e88 commit 3148e84

File tree

4 files changed

+61
-49
lines changed

4 files changed

+61
-49
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
## Angular Snippets Changelog
22

3+
<a name="8.1.1"></a>
4+
5+
# 8.1.1 (2019-06-11)
6+
7+
- Fixed typos in NgRx snippets for `createReducer` and `createEffect`
8+
- Moved NgRx snippets into separate section of README
9+
310
<a name="8.1.0"></a>
411

512
# 8.1.0 (2019-06-07)

README.md

Lines changed: 49 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -26,50 +26,55 @@ Alternatively, press `Ctrl`+`Space` (Windows, Linux) or `Cmd`+`Space` (OSX) to a
2626

2727
### TypeScript Angular Snippets
2828

29-
| Snippet | Purpose |
30-
| -------------------------------------------- | ------------------------------------------------------------ |
31-
| `a-component` | component |
32-
| `a-component-inline` | component with inline template |
33-
| `a-component-root` | root app component |
34-
| `a-directive` | directive |
35-
| `a-guard-can-activate` | `CanActivate` guard |
36-
| `a-guard-can-activate-child` | `CanActivateChild` guard |
37-
| `a-guard-can-deactivate` | `CanDeactivate` guard |
38-
| `a-guard-can-load` | `CanLoad` guard |
39-
| `a-httpclient-get` | `httpClient.get` with Rx Observable |
40-
| `a-http-interceptor` | Empty Angular `HttpInterceptor` for `HttpClient` |
41-
| `a-http-interceptor-headers` | Angular `HttpInterceptor` that sets headers for `HttpClient` |
42-
| `a-http-interceptor-logging` | Angular `HttpInterceptor` that logs traffic for `HttpClient` |
43-
| `a-module` | module |
44-
| `a-module-root` | root app module |
45-
| `a-module-routing` | routing module file (forChild) |
46-
| `a-ngrx-store-module` | create an NgRx store module |
47-
| `a-ngrx-create-action` | create an NgRx action with `createAction` |
48-
| `a-ngrx-create-action-props` | create an NgRx action with `createAction` with props |
49-
| `a-ngrx-create-reducer` | create an NgRx reducer with `createReducer` |
50-
| `a-ngrx-create-effect` | create an NgRx effect with `createEffect` |
51-
| `a-ngrx-create-effect-api` | create an NgRx effect with `createEffect` for an API call |
52-
| `a-ngrx-create-selector` | create an NgRx selector with `createSelector` |
53-
| `a-ngrx-create-selector-props` | create an NgRx selector with `createSelector` with props |
54-
| `a-ngrx-data-entity-data-module-import` | add `EntityDataModule` |
55-
| `a-ngrx-data-entity-metadata` | create the entity metadata for NgRx |
56-
| `a-ngrx-data-entity-collection-data-service` | create a data service using NgRx |
57-
| `a-output-event` | `@Output` event and emitter |
58-
| `a-pipe` | pipe |
59-
| `a-resolver` | resolver |
60-
| `a-rxjs-import` | import RxJs features |
61-
| `a-rxjs-operators` | import RxJs operators |
62-
| `a-route-path-404` | 404 route path |
63-
| `a-route-path-default` | default route path |
64-
| `a-route-path-with-children` | route path with children |
65-
| `a-route-path-eager` | eager route path |
66-
| `a-route-path-lazy` | lazy route path |
67-
| `a-router-events` | listen to one or more router events |
68-
| `a-route-params-subscribe` | subscribe to route parameters |
69-
| `a-service` | service |
70-
| `a-service-httpclient` | service with `HttpClient` |
71-
| `a-ctor-skip-self` | angular `NgModule`'s `skipself` constructor |
72-
| `a-subscribe` | Rx Observable subscription |
29+
| Snippet | Purpose |
30+
| ---------------------------- | ------------------------------------------------------------ |
31+
| `a-component` | component |
32+
| `a-component-inline` | component with inline template |
33+
| `a-component-root` | root app component |
34+
| `a-directive` | directive |
35+
| `a-guard-can-activate` | `CanActivate` guard |
36+
| `a-guard-can-activate-child` | `CanActivateChild` guard |
37+
| `a-guard-can-deactivate` | `CanDeactivate` guard |
38+
| `a-guard-can-load` | `CanLoad` guard |
39+
| `a-httpclient-get` | `httpClient.get` with Rx Observable |
40+
| `a-http-interceptor` | Empty Angular `HttpInterceptor` for `HttpClient` |
41+
| `a-http-interceptor-headers` | Angular `HttpInterceptor` that sets headers for `HttpClient` |
42+
| `a-http-interceptor-logging` | Angular `HttpInterceptor` that logs traffic for `HttpClient` |
43+
| `a-module` | module |
44+
| `a-module-root` | root app module |
45+
| `a-module-routing` | routing module file (forChild) |
46+
| `a-output-event` | `@Output` event and emitter |
47+
| `a-pipe` | pipe |
48+
| `a-resolver` | resolver |
49+
| `a-rxjs-import` | import RxJs features |
50+
| `a-rxjs-operators` | import RxJs operators |
51+
| `a-route-path-404` | 404 route path |
52+
| `a-route-path-default` | default route path |
53+
| `a-route-path-with-children` | route path with children |
54+
| `a-route-path-eager` | eager route path |
55+
| `a-route-path-lazy` | lazy route path |
56+
| `a-router-events` | listen to one or more router events |
57+
| `a-route-params-subscribe` | subscribe to route parameters |
58+
| `a-service` | service |
59+
| `a-service-httpclient` | service with `HttpClient` |
60+
| `a-ctor-skip-self` | angular `NgModule`'s `skipself` constructor |
61+
| `a-subscribe` | Rx Observable subscription |
62+
63+
### NgRx Snippets
64+
65+
| Snippet | Purpose |
66+
| -------------------------------------------- | --------------------------------------------------------- |
67+
| `a-ngrx-store-module` | create an NgRx store module |
68+
| `a-ngrx-create-action` | create an NgRx action with `createAction` |
69+
| `a-ngrx-create-action-props` | create an NgRx action with `createAction` with props |
70+
| `a-ngrx-create-reducer` | create an NgRx reducer with `createReducer` |
71+
| `a-ngrx-create-effect` | create an NgRx effect with `createEffect` |
72+
| `a-ngrx-create-effect-api` | create an NgRx effect with `createEffect` for an API call |
73+
| `a-ngrx-create-selector` | create an NgRx selector with `createSelector` |
74+
| `a-ngrx-create-selector-props` | create an NgRx selector with `createSelector` with props |
75+
| `a-ngrx-data-entity-data-module-import` | add `EntityDataModule` |
76+
| `a-ngrx-data-entity-metadata` | create the entity metadata for NgRx |
77+
| `a-ngrx-data-entity-collection-data-service` | create a data service using NgRx |
7378

7479
### Dockerfile Snippets
7580

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"TypeScript",
2121
"HTML"
2222
],
23-
"version": "8.1.0",
23+
"version": "8.1.1",
2424
"engines": {
2525
"vscode": "^1.20.0"
2626
},

snippets/typescript.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -491,11 +491,11 @@
491491
"description": "Creates an NgRx Reducer",
492492
"body": [
493493
"const ${1:feature}Reducer = createReducer(",
494-
"\tintialState,",
494+
"\tinitialState,",
495495
"\ton($1Actions.action, state => ({ ...state, ${2:prop}: ${3:updatedValue} })),",
496496
");",
497497
"",
498-
"export function reducer(state: State | undefined: action: Action) {",
498+
"export function reducer(state: State | undefined, action: Action) {",
499499
"\treturn $1Reducer(state, action);",
500500
"}"
501501
]
@@ -505,7 +505,7 @@
505505
"description": "Creates an NgRx Effect",
506506
"body": [
507507
"${1:effectName}$ = createEffect(() => this.actions$.pipe(",
508-
"\tofType(${2:action}.type),",
508+
"\tofType(${2:action}),",
509509
"\t/** An EMPTY observable only emits completion. Replace with your own observable stream */",
510510
"\t${3:operator}(() => ${4:EMPTY})",
511511
"\t)",
@@ -517,7 +517,7 @@
517517
"description": "Creates an NgRx Effect Scaffolded for API Call",
518518
"body": [
519519
"${1:effectName}$ = createEffect(() => this.actions$.pipe(",
520-
"\tofType(${2:Feature}Actions.${3:action}.type),",
520+
"\tofType(${2:Feature}Actions.${3:action}),",
521521
"\t${4:operator}(() =>",
522522
"\t\t${5:apiSource}.pipe(",
523523
"\t\t\tmap(data => $2Actions.$3Success({ data })),",

0 commit comments

Comments
 (0)