Created
December 13, 2020 21:18
-
-
Save sudomann/55e6209516aa8422c174c28df1b01fea to your computer and use it in GitHub Desktop.
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 { authClient } from "./auth-client"; | |
import { httpClient } from "./http-client"; | |
import { IllegalModificationError } from "./errors"; | |
export const Transport = { | |
get Auth() { | |
return authClient; | |
}, | |
get Http() { | |
return httpClient; | |
}, | |
// Disallow changing Auth and Http | |
set Auth(something) { | |
throw IllegalModificationError(something, "Auth"); | |
}, | |
set Http(something) { | |
throw IllegalModificationError(something, "Http"); | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment