dbos-transact-ts icon indicating copy to clipboard operation
dbos-transact-ts copied to clipboard

Usage without decorators ?

Open astahmer opened this issue 10 months ago • 1 comments

Hey, this library looks great but I'd prefer not to introduce decorators/build-step in my codebase as I'm using node v22+ without building (node --no-warnings=ExperimentalWarning --experimental-strip-types)

is this something that you've thought about / planned ?

astahmer avatar Feb 13 '25 17:02 astahmer

Hi @astahmer, thanks for the feedback. We don't have immediate plans to expose a no-decorators only interface. We use decorators mostly to register operations in an internal register and wrap DBOS code around user-defined functions. It should be possible to do it without decorators by manually calling registerAndWrapDBOSFunction and the like.

maxdml avatar Feb 19 '25 16:02 maxdml

The TSv3 API that is in preview now allows usage without decorators, and we've tested straight JavaScript.

chuck-dbos avatar Jul 08 '25 14:07 chuck-dbos

With the release of TSv3, this is complete. You can use functions like runStep, registerStep, registerWorkflow, etc., from JS and not need any TS or decorators.

The JS unit test is here. https://github.com/dbos-inc/dbos-transact-ts/blob/main/tests/jsapi.test.js

chuck-dbos avatar Jul 31 '25 13:07 chuck-dbos