UNPKG

1.16 kBTypeScriptView Raw
1import { Domain, DomainModule } from 'bf-types';
2import { Nullable } from './types';
3/**
4 * Convert a block-5 domain name into a URI formatted string
5 *
6 * @param domainName The name of a block-5 domain
7 */
8export declare function domainToUri(domainName: Domain): string;
9/**
10 * Convert a block-5 module name into a URI formatted string
11 *
12 * @param moduleName The name of a block-5 module
13 */
14export declare function moduleToUri(moduleName: DomainModule): string;
15/**
16 * Get the domain name associated with a particular module name
17 *
18 * @param moduleName The name of a block-5 module
19 */
20export declare function getModuleDomain(moduleName: DomainModule): Nullable<Domain>;
21/**
22 * Get the base URI associated with a particular block-5 module name
23 *
24 * @param moduleName The name of a block-5 module
25 */
26export declare function getModuleBaseUri(moduleName: string, uri?: string): string;
27/**
28 * Ensure that both a domain name and module name are valid
29 *
30 * @param domainName The name of a block-5 domain
31 * @param moduleName The name of a block-5 module
32 */
33export declare function validateDomainAndModule(domainName: Domain, moduleName: DomainModule): void;