Method
onGot
(
keyOrType: KeyOrType,
fn: (data: IPublicTypeEditorGetResult<T, KeyOrType>) => void,
)
Source from the content-addressed store, hash-verified
| 219 | } |
| 220 | |
| 221 | onGot<T = undefined, KeyOrType extends IPublicTypeEditorValueKey = any>( |
| 222 | keyOrType: KeyOrType, |
| 223 | fn: (data: IPublicTypeEditorGetResult<T, KeyOrType>) => void, |
| 224 | ): () => void { |
| 225 | const x = this.context.get(keyOrType); |
| 226 | if (x !== undefined) { |
| 227 | fn(x); |
| 228 | } |
| 229 | this.setWait(keyOrType, fn); |
| 230 | return () => { |
| 231 | this.delWait(keyOrType, fn); |
| 232 | }; |
| 233 | } |
| 234 | |
| 235 | onChange<T = undefined, KeyOrType extends IPublicTypeEditorValueKey = any>( |
| 236 | keyOrType: KeyOrType, |
Callers
nothing calls this directly
Tested by
no test coverage detected