Skip to content

Generate TypeScript types from your directus schema for custom extension development

Notifications You must be signed in to change notification settings

michael-scheurer/directus-extension-models

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Directus extension: Generate TypeScript Types Models

This extension lets you generate typescript types from your Schema, allowing you to more easily develop your custom extensions with type checking.

Usage

To install the extension, simply install the package into your project:

npm install directus-extension-models

or

yarn add directus-extension-models

Then, run the models snapshot command to export your model to disk: directus models snapshot <taretFile>.

Example:

directus models snapshot ./path/to/target/model.d.ts

Note: Geometry Support

I am still working on support for the geometry types.

Note: Custom Types Support

I have not added support for custom types. If you would like your custom type to be supported, create an issue.

About

Generate TypeScript types from your directus schema for custom extension development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%