-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
29 lines (24 loc) · 1.05 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { Stream, Sink } from '@rdfjs/types'
import { EventEmitter } from 'events';
import type { Environment } from '@rdfjs/environment/Environment.js';
import type { Formats } from '@rdfjs/formats';
export const mediaTypes: {
jsonLd: 'application/ld+json',
ntriples: 'application/n-triples',
nquads: 'application/n-quads',
notation3: 'text/n3',
rdfXml: 'application/rdf+xml',
trig: 'application/trig',
turtle: 'text/turtle',
}
interface SinkConstructor<I extends EventEmitter, O extends EventEmitter> {
new (arg?: { factory: Environment<any> }): Sink<I, O>;
}
export const TurtleSerializer: SinkConstructor<EventEmitter, Stream>
export const RdfXmlSerializer: SinkConstructor<EventEmitter, Stream>
export const TrigSerializer: SinkConstructor<EventEmitter, Stream>
export const JsonLdSerializer: SinkConstructor<EventEmitter, Stream>
export const TrigParser: SinkConstructor<Stream, EventEmitter>
export const NQuadsParser: SinkConstructor<Stream, EventEmitter>
declare const formats: Pick<Formats, 'parsers' | 'serializers'>
export default formats