Skip to content

Commit

Permalink
WIP linkeddata#355 typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
joepio committed Oct 22, 2019
1 parent 21ad8ce commit 22090e2
Show file tree
Hide file tree
Showing 13 changed files with 211 additions and 163 deletions.
5 changes: 3 additions & 2 deletions src/blank-node.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import ClassOrder from './class-order'
import Node from './node-internal'
import { IndexedFormula } from './index';
import { TermType, BlankNodeTermType } from './types';
import { TermType, BlankNodeTermType, TFBlankNode } from './types';

/**
* An RDF blank node is a Node without a URI
* @link https://rdf.js.org/data-model-spec/#blanknode-interface
*/
export default class BlankNode extends Node {
export default class BlankNode extends Node implements TFBlankNode {

termType: BlankNodeTermType;
static termType: BlankNodeTermType;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/collection.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import BlankNode from './blank-node'
import ClassOrder from './class-order'
import Node from './node-internal'
import { ValueType, Bindings, Term, CollectionTermType, TermType } from './types';
import { ValueType, Bindings, TFTerm, CollectionTermType, TermType } from './types';

export function isCollection<T>(value: T | Term): value is Collection {
export function isCollection<T>(value: T | TFTerm): value is Collection {
return (value as Node).termType === 'Collection'
}

Expand Down
4 changes: 2 additions & 2 deletions src/default-graph.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Node from './node-internal'
import { RDFJSDefaultGraph } from './types';
import { TFDefaultGraph } from './types';

export default class DefaultGraph extends Node implements RDFJSDefaultGraph {
export default class DefaultGraph extends Node implements TFDefaultGraph {
value: ''

constructor () {
Expand Down
Loading

0 comments on commit 22090e2

Please sign in to comment.