()
| 876 | } |
| 877 | |
| 878 | func (n *Node) IsTypeOnly() bool { |
| 879 | switch n.Kind { |
| 880 | case KindImportEqualsDeclaration: |
| 881 | return n.AsImportEqualsDeclaration().IsTypeOnly |
| 882 | case KindImportSpecifier: |
| 883 | return n.AsImportSpecifier().IsTypeOnly |
| 884 | case KindImportClause: |
| 885 | return n.AsImportClause().PhaseModifier == KindTypeKeyword |
| 886 | case KindExportDeclaration: |
| 887 | return n.AsExportDeclaration().IsTypeOnly |
| 888 | case KindExportSpecifier: |
| 889 | return n.AsExportSpecifier().IsTypeOnly |
| 890 | } |
| 891 | return false |
| 892 | } |
| 893 | |
| 894 | // If updating this function, also update `hasComment`. |
| 895 | func (n *Node) CommentList() *NodeList { |
no test coverage detected