Skip to content

Commit

Permalink
Merge pull request #72 from cloudnc/fix/demo-app-compilation
Browse files Browse the repository at this point in the history
chore: fix demo app compilation and make sure to build it on CI to not break it again
  • Loading branch information
maxime1992 authored Feb 4, 2024
2 parents 1e90976 + 0b63e97 commit cf2c6da
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ jobs:
run: yarn prettier:check
- name: Check Readme
run: yarn readme:check
- name: Build
- name: Build lib
run: yarn lib:build:prod
- name: Build app
run: yarn demo:build:prod
- name: Test
run: yarn lib:test:ci
- name: Coverage
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { getObservableLifecycle } from 'ngx-observable-lifecycle';
import { Observable } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
export function automaticUnsubscribe<T>(component): (source: Observable<T>) => Observable<T> {
export function automaticUnsubscribe<T>(component: any): (source: Observable<T>) => Observable<T> {
const { ngOnDestroy } = getObservableLifecycle(component);
return (source: Observable<T>): Observable<T> => source.pipe(takeUntil(ngOnDestroy));
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<app-child *ngIf="showChildComponent" [input]="inputValue"></app-child>
<app-child *ngIf="showChildComponent" [input1]="inputValue"></app-child>
<hr />
<button (click)="inputValue = inputValue + 1">Increment inputValue</button>
<button (click)="showChildComponent = !showChildComponent">Toggle child component</button>
Expand Down
2 changes: 1 addition & 1 deletion src/app/child/child.component.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<p>child-component works!</p>
input value is: {{ input }}
input value is: {{ input1 }}
2 changes: 1 addition & 1 deletion src/app/lib-example/lib-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { getObservableLifecycle } from 'ngx-observable-lifecycle';
import { Observable } from 'rxjs';
import { takeUntil } from 'rxjs/operators';

export function automaticUnsubscribe<T>(component): (source: Observable<T>) => Observable<T> {
export function automaticUnsubscribe<T>(component: any): (source: Observable<T>) => Observable<T> {
const { ngOnDestroy } = getObservableLifecycle(component);
return (source: Observable<T>): Observable<T> => source.pipe(takeUntil(ngOnDestroy));
}

0 comments on commit cf2c6da

Please sign in to comment.