Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save couzic/45aa9d1b5e2db7245045488becc834f2 to your computer and use it in GitHub Desktop.

Select an option

Save couzic/45aa9d1b5e2db7245045488becc834f2 to your computer and use it in GitHub Desktop.
Temporal Transparency - Data Access Layer Counter Example
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