https://github.com/sr258/h5p-types
TypeScript definitions for H5P
https://github.com/sr258/h5p-types
Last synced: 4 months ago
JSON representation
TypeScript definitions for H5P
- Host: GitHub
- URL: https://github.com/sr258/h5p-types
- Owner: sr258
- Created: 2021-12-29T19:59:48.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-04T16:06:58.000Z (over 4 years ago)
- Last Synced: 2025-10-13T17:38:29.181Z (8 months ago)
- Size: 42 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# H5P type definitions and schemas
These files help you by providing code completion in VS Code or other IDEs.
## Types
`npm install --save-dev @h5p-types/h5p-core` will give you code completion if
you add `@h5p-types` to your type roots in TypeScript (`tsconfig.json`):
```json
{ "typeRoots": ["node_modules/@types", "node_modules/@h5p-types"] }
```
## JSON Schemas
Add this to settings.json in VS Code to get code completion when editing
`library.json` and `semantics.json` (semantic code completion is not very
context sensitive and offers more options than are allowed, but it's a start):
```json
{
"json.schemas": [
{
"fileMatch": ["/semantics.json"],
"url": "https://raw.githubusercontent.com/sr258/h5p-types/main/schemas/semantics-schema.json"
},
{
"fileMatch": ["/library.json"],
"url": "https://raw.githubusercontent.com/sr258/h5p-types/main/schemas/library-schema.json"
}
]
}
```