MCPcopy
hub / github.com/ampproject/amphtml / devAssertString

Function devAssertString

src/core/assert/dev.js:108–119  ·  view source on GitHub ↗
(shouldBeString, opt_message)

Source from the content-addressed store, hash-verified

106 * @throws {Error} when shouldBeString is not an String
107 */
108export function devAssertString(shouldBeString, opt_message) {
109 if (mode.isMinified()) {
110 return /** @type {void} */ (shouldBeString);
111 }
112 devAssertDceCheck();
113
114 return assertions.assertString(
115 /** @type {import('./base').AssertionFunctionDef} */ (devAssert),
116 shouldBeString,
117 opt_message
118 );
119}
120
121/**
122 * Throws an error if the first argument isn't a number. The allowed values

Callers 2

applyStaticLayoutFunction · 0.90
deserializeMessageFunction · 0.90

Calls 2

devAssertDceCheckFunction · 0.85
assertStringMethod · 0.80

Tested by

no test coverage detected