This package has been deprecated
WARNING: This project has been renamed to 'rdf-tools'.
Generate TypeScript from RDF.
npm install -g rdf-to-ts
Usage: dist [options] <pattern> Generate TypeScript from RDF Options: -V, --version output the version number -p, --prefixes output prefixes -i, --iris output IRIs -l, --literals output literals -c, --classes output classes -d, --default-exports output default exports. Can only be used in combination with other flags -D, --debug output debug information -h, --help output usage information
The following command will output types for all classes explicitly defined in the ontology, as well as an object containing the prefixes and IRIs used by the ontology.
rdf-to-ts example.ttl > example.ts
How does it work?
In order to construct types for the classes in the ontology we need the following pieces of information for each type:
owl:Class: What is the name of the class?
rdfs:subClassOf: What are its super-classes?
owl:FunctionalProperty: Property names, types and pluralities.