我有一个列表Business
看起来这个(Company
:list parent; Item
:list children)
Business
--------
CompanyA
TaxRate
Item1
Name
Price
Total
Item2
Name
Price
Total
Month
CompanyB
TaxRate
Item3
Name
Price
Total
Item4
Name
Price
Total
Month
CompanyA
TaxRate
Item5
Name
Price
Total
Item6
Name
Price
Total
Month
我想将Company
分组为TaxRate
,看起来就是这个
Business
--------
CompanyA
TaxRate
Item1
Name
Price
Total
Item2
Name
Price
Total
Item5
Name
Price
Total
Item6
Name
Price
Total
Month
CompanyB
TaxRate
Item3
Name
Price
Total
Item4
Name
Price
Total
Month
我希望在这种情况下有人会帮助我
答案 0 :(得分:1)
这是我找到完成任务的最佳方式:
let symbol = checker.getSymbolAtLocation(imp.name)
// Get Type
let type = checker.getDeclaredTypeOfSymbol(symbol);