#Can a Dagger module be spread across two

1 messages ยท Page 1 of 1 (latest)

low dune
#

Is this why Go is better? It's not constrained by being within a class ๐Ÿ™‚

simple tide
#

Every SDK supports multiple files and classes. The difference for Go is you can have functions of the same object in different files.

low dune
#

How do I get dagger functions to show me the functions for multiple files with TypeScript?

simple tide
#

Nothing to do on the CLI, it just has to be done right in TypeScript:

  • Make sure all types are imported in a src/index.ts
  • Make sure those types are constructed (i.e., referenced in the return type of another function) from another object's method/function (except the "main object" which is created via its own constructor)
low dune
#

So the functions can't be completely independant?

simple tide
#

Nope ๐Ÿ™‚

#

There needs to be a chain, starting from the main object.

low dune
#

That means dealing with large amounts of Dagger code in TypeScript isn't really feasible

simple tide
#

How so?

#

The main object can just construct other objects in other files.

low dune
#

Maybe I'm not understanding correctly, do you have an example?

low dune
#

Thank you