Experimental Valadoc Doclet to generate Typescript Definition files for Gjs and node-gtk.
https://benwaffle.github.io/vala-language-server/
On elementary OS or Ubuntu run:
sudo add-apt-repository ppa:vala-team
sudo apt update
sudo apt install valac valadoc libvaladoc-dev libgee-0.8* build-essential python3 python3-pip python3-setuptools python3-wheel ninja-build
Install meson:
pip3 install --user meson
# Maybe you need to add the meson install path to you PATH variable:
echo "export PATH=\$HOME/.local/bin:\$PATH" >> ~/.bashrc # For bash or ~/.zshrc for ZSH
Install Node.js and NPM:
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
nvm install node
Install NPM dependencies
npm install
Now you can build the Valadoc Doclet with with:
npm run build
And build the Typescript Type Definition files:
npm run types
sudo apt install libglib2.0-dev libgtk-3-dev
As a Typescript developer you don't want to code without autocompletion - You also have that with Vala.
To use the latest Valadoc version follow the compile and install instructions of Vala.
On my machine (Ubuntu) I still had to add the new compiled shared libraries to the Linux's system library path:
sudo echo "/usr/local/lib/" >> /etc/ld.so.conf.d/vala.conf
sudo ldconfig
sudo apt install libjsonrpc-glib-1.0-1 libjsonrpc-glib-1.0-dev libjson-glib-1.0-0
Build:
meson -Dprefix=/usr/local build