Last active
April 8, 2017 07:09
-
-
Save couzic/45aa9d1b5e2db7245045488becc834f2 to your computer and use it in GitHub Desktop.
Temporal Transparency - Data Access Layer Counter Example
This file contains hidden or 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
| import {Observable, Subject} from 'rxjs' | |
| export type PersonId = string | |
| export interface Person { | |
| id: PersonId | |
| name: string | |
| } | |
| export const peopleData = { | |
| fetch(id: PersonId): Observable<Person> { | |
| return Observable.ajax.getJSON(`/api/person/${id}`) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment