TypeScript and JSON-LD now both have type information, with TypeScript describing program APIs and JSON-LD describing Linked Open Data. Could TypeScript and JSON-LD work together to make these two play well with each other? This example is a start for exploring what that could look like. Possible applications:
- Notifications of type incompatibilities between a program and a REST API
- Code completion for editors/IDEs
- Documentation generation for both program and REST APIs
- ...
And now that AtScript and TypeScript have merged, it would be cool to see OData and JSON-LD work together for a similar merge in the future.
The JSON-LD is based on this example.
Live transpiler from TypeScript to ES5: here.