Does TFS Build have something like a Jenkinsfile?
The strict answer is no, in that there is no direct equivalent to a Jenkinsfile. However, there are Build Process Templates and you can use the Psake Build Automation tool in combination with templates to reduce the barriers to entry for creating a new build, test and deployment build definitions.

It is nowhere near as fluid as Jenkins' Pipelines as Code, AppVeyor's appveyor.yml, CircleCI's circleci.yml and Travis' .travis.yml.  There is a wealth of information on the ALM Rangers Library of tooling and guidance solutions.