someCodePiece in:file searches for code in any file in the repository
filename: something.ts searches for filenames in the repository
something in:path searches in file path
You can search by more criteria like
extension:TS or by
You can search almost anything, for example commits, topics, repositories, issues, PRs, discussions, users, packages, wikis, forks.
More on the Search On GitHub page.