MCPcopy Create free account
hub / github.com/microsoft/tslib / __classPrivateFieldGet

Function __classPrivateFieldGet

tslib.es6.js:277–281  ·  view source on GitHub ↗
(receiver, state, kind, f)

Source from the content-addressed store, hash-verified

275}
276
277export function __classPrivateFieldGet(receiver, state, kind, f) {
278 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
279 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
280 return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
281}
282
283export function __classPrivateFieldSet(receiver, state, value, kind, f) {
284 if (kind === "m") throw new TypeError("Private method is not writable");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected