(
opts: {
/** The default store URL, where to send commits and where to create new instances */
serverUrl?: string;
/** Default Agent, used for signing commits. Is required for posting things. */
agent?: Agent;
} = {},
)
| 35 | public errorHandler: (e: Error) => unknown; |
| 36 | |
| 37 | constructor( |
| 38 | opts: { |
| 39 | /** The default store URL, where to send commits and where to create new instances */ |
| 40 | serverUrl?: string; |
| 41 | /** Default Agent, used for signing commits. Is required for posting things. */ |
| 42 | agent?: Agent; |
| 43 | } = {}, |
| 44 | ) { |
| 45 | opts.serverUrl && this.setServerUrl(opts.serverUrl); |
| 46 | opts.serverUrl && this.setAgent(opts.agent); |
| 47 | this.resources = new Map(); |
| 48 | this.subscribers = new Map(); |
| 49 | this.errorHandler = (e: Error) => { |
| 50 | throw e; |
| 51 | }; |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Adds a Resource to the store and notifies subscribers. Replaces existing |
nothing calls this directly
no test coverage detected