Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

roadiz/dts-generator

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

158 Commits
158 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dts-generator

Roadiz sub-package which generates Typescript interface declaration skeleton based on your schema.

Unit tests, static analysis and code style

Usage

use RZ\Roadiz\Contracts\NodeType\NodeTypeInterface;
use RZ\Roadiz\Typescript\Declaration\DeclarationGeneratorFactory;
use RZ\Roadiz\Typescript\Declaration\Generators\DeclarationGenerator;
use Symfony\Component\HttpFoundation\ParameterBag;

/** @var ParameterBag<NodeTypeInterface> $nodeTypesBag */
$nodeTypesBag = $serviceContainer->get('nodeTypesBag');

$declarationFactory = new DeclarationGeneratorFactory($nodeTypesBag);
$declaration = new DeclarationGenerator($declarationFactory);

echo $declaration->getContents();

Contributing

Report issues and send Pull Requests in the main Roadiz repository

About

Roadiz sub-package which generates Typescript interfaces skeleton based on your schema. (read-only)

Resources

License

Stars

Watchers

Forks

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.