Skip to content

Commit a7e7440

Browse files
committed
chore(demo): narrow string literal types with as const
1 parent 7fe3f4e commit a7e7440

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

apps/demo/src/app/flight-search-with-pagination/flight-search-with-pagination.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class FlightSearchWithPaginationComponent {
2626
searchParams: { from: string; to: string } = { from: 'Wien', to: '' };
2727
flightStore = inject(FlightBookingStore);
2828

29-
displayedColumns: string[] = ['from', 'to', 'date'];
29+
displayedColumns = ['from', 'to', 'date'] as const;
3030
dataSource = new MatTableDataSource<Flight>([]);
3131
selection = new SelectionModel<Flight>(true, []);
3232

apps/demo/src/app/reset/todo.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import { TodoStore } from './todo-store';
5353
export class TodoComponent {
5454
todoStore = inject(TodoStore);
5555

56-
displayedColumns: string[] = ['finished', 'name'];
56+
displayedColumns = ['finished', 'name'] as const;
5757
dataSource = new MatTableDataSource<Todo>([]);
5858
selection = new SelectionModel<Todo>(true, []);
5959

apps/demo/src/app/todo-indexeddb-sync/todo-indexeddb-sync.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { SyncedTodoStore } from './synced-todo-store';
1616
export class TodoIndexeddbSyncComponent {
1717
todoStore = inject(SyncedTodoStore);
1818

19-
displayedColumns: string[] = ['finished', 'name', 'description', 'deadline'];
19+
displayedColumns = ['finished', 'name', 'description', 'deadline'] as const;
2020
dataSource = new MatTableDataSource<Todo>([]);
2121
selection = new SelectionModel<Todo>(true, []);
2222

apps/demo/src/app/todo-storage-sync/todo-storage-sync.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { SyncedTodoStore } from './synced-todo-store';
1515
export class TodoStorageSyncComponent {
1616
todoStore = inject(SyncedTodoStore);
1717

18-
displayedColumns: string[] = ['finished', 'name', 'description', 'deadline'];
18+
displayedColumns = ['finished', 'name', 'description', 'deadline'] as const;
1919
dataSource = new MatTableDataSource<Todo>([]);
2020
selection = new SelectionModel<Todo>(true, []);
2121

0 commit comments

Comments
 (0)