MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / assertPrivate

Function assertPrivate

lib.esm/utils/errors.js:217–231  ·  view source on GitHub ↗
(givenGuard, guard, className)

Source from the content-addressed store, hash-verified

215 * throwing if not, indicating the %%className%% if provided.
216 */
217export function assertPrivate(givenGuard, guard, className) {
218 if (className == null) {
219 className = "";
220 }
221 if (givenGuard !== guard) {
222 let method = className, operation = "new";
223 if (className) {
224 method += ".";
225 operation += " " + className;
226 }
227 assert(false, `private constructor; use ${method}from* methods`, "UNSUPPORTED_OPERATION", {
228 operation
229 });
230 }
231}
232//# sourceMappingURL=errors.js.map

Callers 15

constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorFunction · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90

Calls 1

assertFunction · 0.70

Tested by

no test coverage detected