I do this often enough to keep looking it up, so here it is. First, find the commit that deleted the file:

Terminal window
$ git log --oneline --diff-filter=D -- path/to/file.ts

That gives you the commit where the deletion happened. The file still exists in that commit’s parent, so restore it from there:

Terminal window
$ git checkout <sha>^ -- path/to/file.ts

The ^ is the whole trick — it means “the commit before this one.” Grab the SHA of the deletion, add a caret, and the file lands back in your working tree staged and ready to commit.