Lines Matching refs:child
237 function collectTypeApi(child, packageName, className, api, hash, apiInfo, dtsPath) { argument
239 name: child.name.escapedText,
242 if (child.type.types) {
243 child.type.types?.forEach(type => {
244 collectTypeApiInTypes(type, apiInfo, child, api, hash, dtsPath, typeObj, packageName);
246 } else if (child.type.members) {
247 child.type.members?.forEach(member => {
248 …collectTypeApiInMembers(member, apiInfo, child, api, hash, dtsPath, typeObj, packageName, classNam…
254 function collectTypeApiInTypes(type, apiInfo, child, api, hash, dtsPath, typeObj, packageName) { argument
259 addApi(packageName, child.name.escapedText, type.literal.text, child.getText(),
260 getApiInfo(child, faterApiInfo), 'Type', api, hash, dtsPath, 1);
267 addApi(packageName, child.name.escapedText, type.getText(), child.getText(),
268 getApiInfo(child, faterApiInfo), 'Type', api, hash, dtsPath, 2);
274 function collectTypeApiInMembers(member, apiInfo, child, api, hash, dtsPath, typeObj, packageName, … argument
280 addApi(packageName, child.name.escapedText, type.literal.text, child.getText(),
281 getApiInfo(child, faterApiInfo), 'Type', api, hash, dtsPath, 3);
288 addApi(packageName, className, child.name.escapedText, child.getText(),
289 getApiInfo(child, faterApiInfo), 'Type', api, hash, dtsPath, 4);
299 children.forEach(child => {
300 if (ts.isTypeAliasDeclaration(child)) {
301 if (child.type) {
302 let typeObj = collectTypeApi(child, packageName, className, api, hash, apiInfo, dtsPath);
309 children.forEach(child => {
312 if (/export.*\{.*\}/g.test(child.getText())) {
316 …methodName: child.getText().replace('export', '').replace('{', '').replace('}', '').replace(';', '…
321 if (ts.isInterfaceDeclaration(child)) {
322 …collectInterfaceDeclaration(child, packageName, api, exportApi, returnDeclarationArr, hash, faterA…
323 } else if (ts.isModuleDeclaration(child)) {
324 …collectModuleDeclaration(child, packageName, api, exportApi, returnDeclarationArr, hash, faterApiI…
325 } else if (ts.isClassDeclaration(child)) {
326 …collectClassDeclaration(child, packageName, api, exportApi, returnDeclarationArr, hash, faterApiIn…
327 } else if (ts.isEnumDeclaration(child)) {
328 …collectEnumDeclaration(child, packageName, api, exportApi, returnDeclarationArr, hash, faterApiInf…
330 …if ((ts.isMethodDeclaration(child) || ts.isMethodSignature(child) || ts.isFunctionDeclaration(chil…
331 …(child.name.escapedText === 'on' || child.name.escapedText === 'off') && child.parameters && child…
333 …collectSubscriptionTypeApi(child, apiType, packageName, className, faterApiType, api, currentTypeL…
336 collectOtherApi(child, packageName, className, faterApiInfo, apiType, api,
337 hash, currentClassFunSet, child, dtsPath, returnDeclarationArr);
343 function collectOtherApi(child, packageName, className, faterApiInfo, apiType, api, argument
344 hash, currentClassFunSet, child, dtsPath, returnDeclarationArr) {
346 if (isSpecialMethod(child)) {
347 if (child.name) {
348 methodName = child.name.getText();
353 } else if (ts.isPropertyDeclaration(child) || ts.isPropertySignature(child)) {
354 if (child.type && child.type.parameters) {
355 methodName = child.name.escapedText;
358 methodName = child.name.escapedText;
362 if (child.name) {
363 methodName = child.name.getText();
368 hash, currentClassFunSet, child, dtsPath);
370 if (child.getText().indexOf('constructor') === 0) {
373 } else if (child.getText().indexOf('const') === 0) {
374 const infoObj = collectFieleOrConstant(apiType, methodName, child, returnDeclarationArr);
377 } else if (/\w+:\s*\w+/g.test(child.getText())) {
379 methodName = child.getText().split(':')[0].trim();
382 addApi(packageName, className, methodName, child.getText(),
383 getApiInfo(child, faterApiInfo), apiType, api, hash, dtsPath, 5);
388 function isSpecialMethod(child){ argument
389 …return ts.isMethodDeclaration(child) || ts.isMethodSignature(child) || ts.isFunctionDeclaration(ch…
390 ts.isCallSignatureDeclaration(child) || ts.isConstructSignatureDeclaration(child) ||
391 ts.isIndexSignatureDeclaration(child);
394 function collectFieleOrConstant(apiType, methodName, child, returnDeclarationArr) { argument
395 if (child.getText().replace('const', '').indexOf(':') > 0) {
396 if (returnDeclarationArr.has(child.getText().replace('const', '').split(':')[1].trim())) {
401 methodName = child.getText().replace('const', '').split(':')[0].trim();
402 } else if (child.getText().replace('const', '').indexOf('=') > 0) {
403 if (returnDeclarationArr.has(child.getText().replace('const', '').split('=')[1].trim())) {
408 methodName = child.getText().replace('const', '').split('=')[0].trim();
413 function collectSubscriptionTypeApi(child, apiType, packageName, className, faterApiInfo, api, curr… argument
415 for (let i = 0; i < child.parameters.length; i++) {
416 const param = child.parameters[i];
420 hash, currentClassFunSet, child, dtsPath, param);
423 hash, currentClassFunSet, child, dtsPath);
426 hash, currentClassFunSet, child, dtsPath, currentTypeList, param);
429 let methodName = child.name.escapedText + '_' + param.type.typeName.left.escapedText + '_' +
432 hash, currentClassFunSet, child, dtsPath);
434 let methodName = child.name.escapedText;
436 hash, currentClassFunSet, child, dtsPath);
440 let methodName = child.name.escapedText;
442 hash, currentClassFunSet, child, dtsPath);
453 hash, currentClassFunSet, child, dtsPath) { argument
456 const methodName = child.name.escapedText + '_' + type.literal.text;
458 hash, currentClassFunSet, child, dtsPath);
463 …entTypeListApi(packageName, className, faterApiInfo, apiType, api, hash, currentClassFunSet, child, argument
469 let methodName = child.name.escapedText + '_' + typeString;
471 hash, currentClassFunSet, child, dtsPath);
476 let methodName = child.name.escapedText;
478 hash, currentClassFunSet, child, dtsPath);
483 hash, currentClassFunSet, child, dtsPath, param) { argument
486 let methodName = child.name.escapedText + '_' + param.type.literal.text;
488 hash, currentClassFunSet, child, dtsPath);
490 let methodName = child.name.escapedText + '_' + param.type.literal.text;
492 hash, currentClassFunSet, child, dtsPath);