(givenGuard, guard, className)
| 215 | * throwing if not, indicating the %%className%% if provided. |
| 216 | */ |
| 217 | export 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 |
no test coverage detected