# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DESCRIPTION="Language Server Protocol implementation for TypeScript using tsserver" HOMEPAGE="https://github.com/typescript-language-server/typescript-language-server" # Upstream distributes through npm only. lib/cli.mjs is a rollup bundle that # already inlines every runtime module, so no node_modules tree is needed. # tsserver is not bundled either: the server prefers the typescript of the # project being edited and a tsserver.path from the client, and otherwise # falls back to require.resolve('typescript'). That fallback is what makes it # work on plain JavaScript projects, so a private copy of the last JavaScript # TypeScript series is installed next to the server. It is private, not # dev-lang/typescript, because TypeScript 7 (the native Go port, in the same # slot) ships neither tsserver.js nor lib/typescript.js: depending on the # system package would force "${T}"/${PN} <<-EOF || die #!/bin/sh exec node /usr/share/${PN}/lib/cli.mjs "\$@" EOF dobin "${T}"/${PN} dodoc README.md }