Skip to content

Commit

Permalink
Demo is strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed Sep 18, 2024
1 parent 2a77973 commit 6bb383e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/demo/src/app/pages/author/author-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface Query {
`,
})
export class AuthorPageComponent implements OnInit {
posts: Observable<Post[]>;
posts!: Observable<Post[]>;
constructor(
private readonly apollo: Apollo,
private readonly route: ActivatedRoute,
Expand All @@ -48,7 +48,7 @@ export class AuthorPageComponent implements OnInit {
}
`,
variables: {
authorId: parseInt(this.route.snapshot.paramMap.get('id'), 10),
authorId: parseInt(this.route.snapshot.paramMap.get('id') as string, 10),
},
})
.valueChanges.pipe(map(result => result.data.postsOf));
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/src/app/pages/posts/posts-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface Query {
`,
})
export class PostsPageComponent implements OnInit {
posts: Observable<Post[]>;
posts!: Observable<Post[]>;
constructor(private readonly apollo: Apollo) {}

ngOnInit() {
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/src/app/pages/posts/upvoter.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Component, Input } from '@angular/core';
template: ` <button (click)="upvote()">Upvote</button> `,
})
export class UpvoterComponent {
@Input() postId: number;
@Input() postId!: number;

constructor(private readonly apollo: Apollo) {}

Expand Down
2 changes: 1 addition & 1 deletion packages/demo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": false,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
Expand Down

0 comments on commit 6bb383e

Please sign in to comment.