MCPcopy Index your code
hub / github.com/nodejs/node / getRegularTypeOfObjectLiteral

Function getRegularTypeOfObjectLiteral

test/fixtures/snapshot/typescript.js:67744–67759  ·  view source on GitHub ↗

* If the the provided object literal is subject to the excess properties check, * create a new that is exempt. Recursively mark object literal members as exempt. * Leave signatures alone since they are not subject to the check.

(type)

Source from the content-addressed store, hash-verified

67742 * Leave signatures alone since they are not subject to the check.
67743 */
67744 function getRegularTypeOfObjectLiteral(type) {
67745 if (!(isObjectLiteralType(type) && ts.getObjectFlags(type) & 8192 /* ObjectFlags.FreshLiteral */)) {
67746 return type;
67747 }
67748 var regularType = type.regularType;
67749 if (regularType) {
67750 return regularType;
67751 }
67752 var resolved = type;
67753 var members = transformTypeOfMembers(type, getRegularTypeOfObjectLiteral);
67754 var regularNew = createAnonymousType(resolved.symbol, members, resolved.callSignatures, resolved.constructSignatures, resolved.indexInfos);
67755 regularNew.flags = resolved.flags;
67756 regularNew.objectFlags |= resolved.objectFlags & ~8192 /* ObjectFlags.FreshLiteral */;
67757 type.regularType = regularNew;
67758 return regularNew;
67759 }
67760 function createWideningContext(parent, propertyName, siblings) {
67761 return { parent: parent, propertyName: propertyName, siblings: siblings, resolvedProperties: undefined };
67762 }

Calls 3

isObjectLiteralTypeFunction · 0.85
transformTypeOfMembersFunction · 0.85
createAnonymousTypeFunction · 0.85

Tested by

no test coverage detected