MCPcopy Index your code
hub / github.com/angular/angular / serializeMessage

Function serializeMessage

packages/localize/tools/src/extract/duplicates.ts:53–65  ·  view source on GitHub ↗

* Serialize the given `message` object into a string.

(
  fs: PathManipulation,
  basePath: AbsoluteFsPath,
  message: ɵParsedMessage,
)

Source from the content-addressed store, hash-verified

51 * Serialize the given `message` object into a string.
52 */
53function serializeMessage(
54 fs: PathManipulation,
55 basePath: AbsoluteFsPath,
56 message: ɵParsedMessage,
57): string {
58 if (message.location === undefined) {
59 return ` - "${message.text}"`;
60 } else {
61 const locationFile = fs.relative(basePath, message.location.file);
62 const locationPosition = serializeLocationPosition(message.location);
63 return ` - "${message.text}" : ${locationFile}:${locationPosition}`;
64 }
65}

Callers 1

checkDuplicateMessagesFunction · 0.70

Calls 2

relativeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…