As you say, the file "typescript" was most probably created by the script command, which is used to keep a copy of an interactive session. One can sometimes run this by accident, by typing script at the prompt. If you are worried
that the script command is being started by some other script, you can always use the lsof command to look at the open files and get details abot hwo they were started. For example:
lsof | less
and then search for script in this output, to find either /usr/bin/script (the command itself) or typescript (the log file).