Open-Cap-Format-OCF icon indicating copy to clipboard operation
Open-Cap-Format-OCF copied to clipboard

[Enhancement]: Create a typescript declaration file for the schema and publish the types as an npm package

Open MattCantor opened this issue 1 year ago • 1 comments

Description of Enhancement :

I'd like to propose that we generate a TypeScript declaration file for the schema and publish the types as an npm package.

Why is this Needed?

Having type signatures for the various objects in the schema would improve the DX when building out modules on top of the schema.

An immediate use of this would be to refactor Arthur's validator tools into standalone modules.

Anything else we need to know?

Perhaps we could use a tool like json-schema-to-typescript to automate the process?

MattCantor avatar Oct 19 '24 13:10 MattCantor

This is a really cool idea.

osis avatar Oct 19 '24 17:10 osis