tkrajina / typescriptify-golang-structs

A Golang struct to TypeScript class/interface converter
Apache License 2.0
505 stars 87 forks source link

Prevent bogus paths being added #72

Closed egtann closed 6 months ago

egtann commented 9 months ago

The following resulted in a path being added with t.Add(m../my/dir{}), causing compile-time bugs in the generated Go file:

find ./my/dir -name '*.go' -print0 | xargs -0 tscriptify -package mypackage/my/dir -target=file.ts

The change ensures that if any struct has a filepath separator, we skip it.