Compile devtools-frontend TypeScript with node + node_modules/typescript
instead of the prebuilt tsgo binary.

M153 made devtools-frontend's ts_library.py call the TypeScript Native
Preview (tsgo) unconditionally: third_party/typescript/typescript.py
execs a prebuilt ELF, third_party/typescript/linux-amd64/src/lib/tsc.
The release tarball ships that binary for x86_64 only, and the ebuild
strips bundled ELF files anyway. M152 still had the node path here
(runTsc(use_typescript_go=False) -> [NODE_LOCATION, TSC_LOCATION]);
this restores it. The JS compiler is still in the tarball, as
third_party/devtools-frontend/src/node_modules/typescript (6.0.2),
and is still declared as a ts_library() input in typescript.gni.

Together with gn arg use_typescript_go=false (which does the same for
//tools/typescript), nothing needs third_party/typescript, so
remove_bundled_libraries.py may keep deleting it.

Upstream: https://crbug.com/423789047
Drop when: devtools_paths.py / ts_library.py grow a node fallback again,
or the ebuild starts using a system tsgo.

--- a/third_party/devtools-frontend/src/scripts/build/typescript/ts_library.py
+++ b/third_party/devtools-frontend/src/scripts/build/typescript/ts_library.py
@@ -19,6 +19,7 @@
 ROOT_DIRECTORY_OF_REPOSITORY = path.join(_CURRENT_DIR, '..', '..', '..')
 NODE_MODULES_DIRECTORY = path.join(ROOT_DIRECTORY_OF_REPOSITORY,
                                    'node_modules')
+TSC_LOCATION = path.join(NODE_MODULES_DIRECTORY, 'typescript', 'bin', 'tsc')
 
 try:
     old_sys_path = sys.path[:]
@@ -26,6 +27,7 @@
     import devtools_paths
 finally:
     sys.path = old_sys_path
+NODE_LOCATION = devtools_paths.node_path()
 ESBUILD_LOCATION = devtools_paths.esbuild_path()
 
 BASE_TS_CONFIG_LOCATION = path.join(ROOT_DIRECTORY_OF_REPOSITORY, 'config',
@@ -50,14 +52,15 @@
 
 
 def runTsc(tsconfig_location):
-    sys.path.append(
-        path.join(ROOT_DIRECTORY_OF_REPOSITORY, 'third_party', 'typescript'))
-    import typescript
-    logging.info("runTsc (tsgo): -p %s", tsconfig_location)
-    returncode, stdout, stderr = typescript.RunTypeScriptRaw(
-        ['--project', tsconfig_location])
+    cmd = [NODE_LOCATION, TSC_LOCATION, '-p', tsconfig_location]
+    logging.info("runTsc: %s", ' '.join(cmd))
+    process = subprocess.Popen(cmd,
+                               stdout=subprocess.PIPE,
+                               stderr=subprocess.PIPE,
+                               universal_newlines=True)
+    stdout, stderr = process.communicate()
     # TypeScript does not correctly write to stderr because of https://github.com/microsoft/TypeScript/issues/33849
-    return returncode, stdout + stderr
+    return process.returncode, stdout + stderr
 
 
 # To ensure that Ninja only rebuilds dependents when the actual content/public API of a TypeScript target changes,
