3.0.10 • Published 3 months ago

@types/rdfjs__fetch-lite v3.0.10

Weekly downloads
236
License
MIT
Repository
github
Last release
3 months ago

Installation

npm install --save @types/rdfjs__fetch-lite

Summary

This package contains type definitions for @rdfjs/fetch-lite (https://github.com/rdfjs-base/fetch-lite).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rdfjs__fetch-lite.

index.d.ts

// Type definitions for @rdfjs/fetch-lite 3.0
// Project: https://github.com/rdfjs-base/fetch-lite
// Definitions by: tpluscode <https://github.com/tpluscode>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import { DatasetCoreFactory, DatasetCore, Quad, Stream, BaseQuad } from 'rdf-js';
import * as formats from '@rdfjs/formats-common';

export interface FormatsInit extends RequestInit {
    formats: typeof formats;
    fetch?: typeof fetch | undefined;
}

export interface FactoryInit<D extends DatasetCore<OutQuad, InQuad>, OutQuad extends BaseQuad = Quad, InQuad extends BaseQuad = OutQuad> extends FormatsInit {
    factory: DatasetCoreFactory<OutQuad, InQuad, D>;
}

export interface RdfFetchResponse<Q extends BaseQuad = Quad> extends Response {
    quadStream(): Promise<Stream<Q>>;
}

export interface DatasetResponse<D extends DatasetCore<OutQuad, InQuad>, OutQuad extends BaseQuad = Quad, InQuad extends BaseQuad = OutQuad> extends RdfFetchResponse<OutQuad> {
    dataset(): Promise<D>;
}

declare function rdfFetch(url: string, options: FormatsInit): Promise<RdfFetchResponse>;
declare function rdfFetch <D extends DatasetCore<OutQuad, InQuad>, OutQuad extends BaseQuad = Quad, InQuad extends BaseQuad = OutQuad>(
    url: string,
    options: FactoryInit<D, OutQuad, InQuad>): Promise<DatasetResponse<D, OutQuad, InQuad>>;

export default rdfFetch;
export const Headers: Headers;

Additional Details

Credits

These definitions were written by tpluscode.

3.0.10

3 months ago

3.0.9

4 months ago

3.0.8

4 months ago

3.0.4

10 months ago

3.0.7

6 months ago

3.0.6

7 months ago

3.0.5

8 months ago

3.0.3

11 months ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago