Skip to content

Commit

Permalink
feat: add triple term names
Browse files Browse the repository at this point in the history
  • Loading branch information
jeswr committed Nov 18, 2024
1 parent 7a24e98 commit 47a1b35
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'
``````

## Helper Terms

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 47a1b35

Please sign in to comment.