mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Use correct typings for prefix utility function (#41371)
This commit is contained in:
committed by
Ryan Cavanaugh
parent
a6ee7419ec
commit
7e9cebb5f4
2
types/n3/index.d.ts
vendored
2
types/n3/index.d.ts
vendored
@@ -18,7 +18,7 @@ export interface Prefixes<I = RDF.NamedNode> {
|
||||
}
|
||||
|
||||
export type Term = NamedNode | BlankNode | Literal | Variable | DefaultGraph;
|
||||
export type PrefixedToIri = (suffix: string) => RDF.NamedNode;
|
||||
export type PrefixedToIri = (suffix: string) => NamedNode;
|
||||
|
||||
export class NamedNode implements RDF.NamedNode {
|
||||
readonly termType: "NamedNode";
|
||||
|
||||
@@ -239,4 +239,5 @@ function test_doc_utility() {
|
||||
const prefixes: N3.Prefixes = { rdfs: N3.DataFactory.namedNode('http://www.w3.org/2000/01/rdf-schema#') };
|
||||
const namedNode1: RDF.NamedNode = N3Util.prefix('http://www.w3.org/2000/01/rdf-schema#')('label');
|
||||
const namedNode2: RDF.NamedNode = N3Util.prefixes(prefixes)('rdfs')('label');
|
||||
const namedNode3: N3.NamedNode = N3Util.prefixes(prefixes)('rdfs')('label');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user