Protect ts file content

I believe that no, it’s not possible. Check this out: Is there a way to log the user once, have a valid session for some days, then block access to app until login again?