gzuidhof / tygo

Generate Typescript types from Golang source code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use with local files

OlegGulevskyy opened this issue · comments

Sorry for a silly question, but how would I go about using this lib to convert .go files to .ts specifying a directory, that consists of said go files, instead of packages?
I am trying to supply a local dir to it, but it appears to be trying to query github.com for the package

The way I imagine you can make this work is by making it a valid package by adding a go.mod at the root (try using go mod init). This project uses the actual Go toolchain (as opposed to doing some sort of string/regex matching), and this toolchain needs to see real packages to reason about the code.