pub fn read_source_file(path: &Path) -> FileReadResultExpand description
Read a source file, detecting binary files that should emit TS1490.
TypeScript detects binary files by checking for:
- UTF-16 BOM (FE FF for BE, FF FE for LE)
- Non-valid UTF-8 sequences
- Many control bytes (not expected in source files)
- Files with many null bytes