-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start to redefine the contract between viewmodel construction and ren…
…dering #3334
- Loading branch information
1 parent
2b8f329
commit 85d22a3
Showing
4 changed files
with
12 additions
and
6 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
src/read-side/non-html-views/api/groups/construct-view-model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { ViewModel } from './view-model'; | ||
import { NonHtmlViewRepresentation, toNonHtmlViewRepresentation } from '../../non-html-view-representation'; | ||
|
||
export const renderAsJson = (viewModel: ViewModel): NonHtmlViewRepresentation => toNonHtmlViewRepresentation(viewModel, 'application/json'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Json } from 'fp-ts/Json'; | ||
|
||
export type ViewModel = { | ||
groups: Json, | ||
}; |