Skip to content

Commit

Permalink
feat: add triple term names (#53)
Browse files Browse the repository at this point in the history
* feat: add triple term names

* Update README.md

Co-authored-by: Tomasz Pluskiewicz <[email protected]>

---------

Co-authored-by: Tomasz Pluskiewicz <[email protected]>
  • Loading branch information
jeswr and tpluscode authored Nov 19, 2024
1 parent 7a24e98 commit 115bb9c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ import type { DatasetCore } from '@rdfjs/types/dataset'
import type { Stream } from '@rdfjs/types/stream'
``````

## Additional Types

Note that some helper types exist that do not exist within the RDF/JS specifications. These include:

```typescript
import type { TripleTermName, QuadTermName } from '@rdfjs/types'
```

## Contributing

Everyone is invited to open issues and pull requests. When you create a PR, please add or update the `rdf-js-tests.ts` file to reflect your changes.
Expand Down
7 changes: 6 additions & 1 deletion query/common.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
import { EventEmitter } from "events";
import * as RDF from '../data-model';

/**
* Helper union type for triple term names.
*/
export type TripleTermName = 'subject' | 'predicate' | 'object';

/**
* Helper union type for quad term names.
*/
export type QuadTermName = 'subject' | 'predicate' | 'object' | 'graph';
export type QuadTermName = TripleTermName | 'graph';

// TODO: merge this with Stream upon the next major change
/**
Expand Down

0 comments on commit 115bb9c

Please sign in to comment.