UNPKG

@inrupt/solid-client

Version:

Make your web apps work with Solid Pods.

32 lines (31 loc) 1.35 kB
import type { WithServerResourceInfo } from "../interfaces"; import type { WithFallbackAcl, WithResourceAcl } from "./acl"; /** * ```{warning} * Do not use this function in production code. For use in **unit tests** that * require a [[SolidDataset]] with a resource ACL (Access Control List). * ``` * * Initialises a new empty ACL and attaches it to a given [[SolidDataset]] for use * in **unit tests**; e.g., unit tests that call [[getResourceAcl]]. * * @param resource The Resource to mock up with a new resource ACL. * @returns The input Resource with an empty resource ACL attached. * @since 0.2.0 */ export declare function addMockResourceAclTo<T extends WithServerResourceInfo>(resource: T): T & WithResourceAcl; /** * * ```{warning} * Do not use this function in production code. For use in **unit tests** that require a * [[SolidDataset]] with a fallback ACL (Access Control List). * ``` * * Initialises a new empty fallback ACL and attaches it to a given [[SolidDataset]] for use * in **unit tests**; e.g., unit tests that call [[getFallbackAcl]]. * * @param resource The Resource to mock up with new fallback ACL. * @returns The input Resource with an empty fallback ACL attached. * @since 0.2.0 */ export declare function addMockFallbackAclTo<T extends WithServerResourceInfo>(resource: T): T & WithFallbackAcl;