Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add triple term names #53

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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';
jeswr marked this conversation as resolved.
Show resolved Hide resolved

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