def _extract_imports_exports(self, lines: list[str]) -> list[str]:
        """Extract import and export statements from the code."""
        statements = []
        for line in lines:
            line = line.strip()
            if (
                line.startswith(("import ", "export "))
                or re.match(r"^(import|export)\s+\{", line)
            ) and not line.startswith("//"):
                statements.append(line)
        return statements
Extract import and export statements from the code.
py/core/parsers/text/ts_parser.py