There are a couple of issues with using TypeScript for this: The first is that Google Apps Script doesn't directly support TypeScript, and the second is that the Apps Scripts editor is web based.
Fortunately I've found a simple way to automate all of this using AppleScript.
try set project_name to "Documote" set file_name to "/Users/damian/.../documote/Code.js" set the_text to (do shell script "cat " & file_name) set the clipboard to the_text tell application "Google Chrome" set visible of window project_name to false set visible of window project_name to true activate window project_name tell application "System Events" to keystroke "a" using command down paste selection tab project_name of window project_name tell application "System Events" to keystroke "s" using command down end tell on error errMsg display dialog "Error: " & errMsg end try
You'd need to change the first couple of lines to reflect your situation. The reason for hiding and showing the window is to activate the window.
Once you have the AppleScript you can assign it a shortcut.