deepkit-framework icon indicating copy to clipboard operation
deepkit-framework copied to clipboard

[type] registerConverterCompiler

Open anton-johansson opened this issue 5 years ago • 2 comments

I was looking through documentation of a package: https://marshal.marcj.dev/

There I can see that it has support for custom type converters (registerConverterCompiler), so I can register converters myself. However, when browsing a bit, I found that the package is superseded by this package! Looks a lot more structured, very nice, however I can't seem to find this registration function. Is this no longer supported?

anton-johansson avatar Jan 19 '21 10:01 anton-johansson

Yes, that still works. In fact it got a lot more modular. What is your use-case exactly? If you tell more about what you are planning to do I can provide you examples.

marcj avatar Jan 19 '21 23:01 marcj

Thanks for the reply!

For example, when marshalling and unmarshalling between plain objects and my classes, I want types like LocalDate and LocalDateTime (I'm using js-joda) to be written/parsed to/from strings, using my own format.

anton-johansson avatar Jan 20 '21 09:01 anton-johansson

I'll leave this example and close this issue as there is nothing to do:

https://github.com/deepkit/deepkit-framework/blob/master/packages/type/tests/serializer-api.spec.ts#L47-L65

marcj avatar Dec 03 '22 14:12 marcj