MCPcopy Create free account
hub / github.com/nodejs/node / isObjectLiteralMethodSymbol

Function isObjectLiteralMethodSymbol

test/fixtures/snapshot/typescript.js:134155–134169  ·  view source on GitHub ↗
(symbol)

Source from the content-addressed store, hash-verified

134153 });
134154 }
134155 function isObjectLiteralMethodSymbol(symbol) {
134156 /*
134157 For an object type
134158 `type Foo = {
134159 bar(x: number): void;
134160 foo: (x: string) => string;
134161 }`,
134162 `bar` will have symbol flag `Method`,
134163 `foo` will have symbol flag `Property`.
134164 */
134165 if (!(symbol.flags & (4 /* SymbolFlags.Property */ | 8192 /* SymbolFlags.Method */))) {
134166 return false;
134167 }
134168 return true;
134169 }
134170 /**
134171 * Finds the first node that "embraces" the position, so that one may
134172 * accurately aggregate locals from the closest containing scope.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected