MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / getIdentifierText

Function getIdentifierText

tools/transformers/native-class.js:292–318  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

290}
291
292function getIdentifierText(node) {
293 if (!node) {
294 return undefined;
295 }
296
297 if (ts.isIdentifier(node)) {
298 return node.text;
299 }
300
301 if (ts.isDecorator(node)) {
302 return getIdentifierText(node.expression);
303 }
304
305 if (ts.isCallExpression(node)) {
306 return getIdentifierText(node.expression);
307 }
308
309 if (ts.isPropertyAccessExpression(node)) {
310 return node.name.text;
311 }
312
313 if (ts.isParenthesizedExpression(node)) {
314 return getIdentifierText(node.expression);
315 }
316
317 return undefined;
318}
319
320function setParents(statements, parent) {
321 for (const statement of statements) {

Callers 2

hasNativeClassDecoratorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected