MCPcopy Create free account
hub / github.com/DeepNotesApp/DeepNotes / hget

Method hget

apps/client/src/code/realtime/context.ts:85–99  ·  view source on GitHub ↗
(prefix: DataPrefix_, suffix: string, field: DataField)

Source from the content-addressed store, hash-verified

83 return fields.map((field) => this.hget(prefix, suffix, field));
84 }
85 hget<
86 DataPrefix_ extends DataPrefix,
87 DataField extends Extract<
88 keyof (typeof dataHashes)[DataPrefix_]['fields'],
89 string
90 > = Extract<keyof (typeof dataHashes)[DataPrefix_]['fields'], string>,
91 >(prefix: DataPrefix_, suffix: string, field: DataField) {
92 if (process.env.SERVER) {
93 return;
94 }
95
96 this._subscribe(prefix, suffix, field);
97
98 return internals.realtime.values[getFullKey(prefix, suffix, field)];
99 }
100
101 private _subscribe(prefix: DataPrefix, suffix: string, field: string) {
102 const fullKey = getFullKey(prefix, suffix, field);

Callers 3

mhgetCoalesceMethod · 0.45
mhgetMethod · 0.45
hmgetMethod · 0.45

Calls 2

getFullKeyFunction · 0.90
_subscribeMethod · 0.80

Tested by

no test coverage detected