MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / parseTSFunction

Function parseTSFunction

scripts/javascript_natives/helpers.js:21–39  ·  view source on GitHub ↗
(func, node)

Source from the content-addressed store, hash-verified

19}
20
21export function parseTSFunction(func, node) {
22 if (!func.name.escapedText) {
23 return;
24 }
25
26 const args = func.parameters
27 .map(p => {
28 let text = p.name.escapedText;
29 if (p.questionToken) {
30 text = '?' + text;
31 }
32 if (p.dotDotDotToken) {
33 text = '...' + text;
34 }
35 return text;
36 })
37 .filter(x => x !== 'this');
38 storeMethod(node.name.text, func.name.escapedText, args);
39}
40
41/**
42 * @param thing

Callers 2

index.jsFile · 0.90
tests.jsFile · 0.90

Calls 3

storeMethodFunction · 0.85
filterMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected