UNPKG

2.19 kBTypeScriptView Raw
1/**
2 * Copyright 2020 Inrupt Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal in
6 * the Software without restriction, including without limitation the rights to use,
7 * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
8 * Software, and to permit persons to whom the Software is furnished to do so,
9 * subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
16 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
17 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
18 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
19 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 */
21import React, { ReactElement } from "react";
22import { Thing, SolidDataset, WithResourceInfo, UrlString } from "@inrupt/solid-client";
23export declare type Props = {
24 children: React.ReactNode;
25 loadingComponent?: React.ComponentType | null;
26 onError?(error: Error): void | null;
27};
28export declare type ThingOrThingUrl = {
29 thing?: Thing;
30 thingUrl?: UrlString | string;
31};
32export interface Dataset extends Props {
33 solidDataset: SolidDataset | (SolidDataset & WithResourceInfo);
34}
35export interface DatasetUrl extends Props {
36 datasetUrl: UrlString | string;
37}
38export declare type RequireProperty<T, Prop extends keyof T> = T & {
39 [key in Prop]-?: T[key];
40};
41export declare type RequireThingOrThingUrl = RequireProperty<ThingOrThingUrl, "thing"> | RequireProperty<ThingOrThingUrl, "thingUrl">;
42declare function CombinedDataProvider(props: Dataset & RequireThingOrThingUrl): ReactElement;
43declare function CombinedDataProvider(props: DatasetUrl & RequireThingOrThingUrl): ReactElement;
44export default CombinedDataProvider;
45//# sourceMappingURL=index.d.ts.map
\No newline at end of file