MCPcopy Index your code
hub / github.com/formatjs/formatjs / onMsgExtracted

Function onMsgExtracted

packages/cli-lib/extract.ts:182–194  ·  view source on GitHub ↗
(filePath, msgs)

Source from the content-addressed store, hash-verified

180 ...(opts.additionalComponentNames || []),
181 ],
182 onMsgExtracted(filePath, msgs) {
183 if (opts.extractSourceLocation) {
184 msgs = msgs.map(msg => ({
185 ...msg,
186 ...calculateLineColFromOffset(source, msg.start),
187 }))
188 }
189 messages = messages.concat(msgs)
190
191 if (onMsgExtracted) {
192 onMsgExtracted(filePath, msgs)
193 }
194 },
195 onMetaExtracted(filePath, m) {
196 meta = m
197

Calls 1

Tested by

no test coverage detected