Is there a way to allow a function to be pure only (thus not accepting the function to be non pure) in TypeScript? If yes, which?
You might be able to write a few TSLint rules to catch most of the common cases (access to outside variables, for example), but checking something like that is nigh impossible, so there's no way to actually know 100%.
You (and your team) still have to be disciplined.