(language: &str)
| 33 | |
| 34 | impl Variant { |
| 35 | pub fn from_language(language: &str) -> Option<Variant> { |
| 36 | match language { |
| 37 | "typescript" => Some(Variant::Typescript), |
| 38 | "tsx" => Some(Variant::Tsx), |
| 39 | "javascript" => Some(Variant::Javascript), |
| 40 | "jsx" => Some(Variant::Jsx), |
| 41 | _ => None, |
| 42 | } |
| 43 | } |
| 44 | /// TS-family (typescript/tsx): type annotations, interfaces, enums, |
| 45 | /// aliases, visibility. The JS family lacks all of those hooks. |
| 46 | fn is_ts(self) -> bool { |
nothing calls this directly
no outgoing calls
no test coverage detected