@polkadot/util
Version:
A collection of useful utilities for @polkadot
18 lines (17 loc) • 702 B
TypeScript
interface VersionPath {
path: string;
type: string;
version: string;
}
interface PackageInfo extends VersionPath {
name: string;
}
type FnString = () => string | undefined;
export declare const POLKADOTJS_DISABLE_ESM_CJS_WARNING_FLAG = "POLKADOTJS_DISABLE_ESM_CJS_WARNING";
/**
* @name detectPackage
* @summary Checks that a specific package is only imported once
* @description A `@polkadot/*` version detection utility, checking for one occurrence of a package in addition to checking for dependency versions.
*/
export declare function detectPackage({ name, path, type, version }: PackageInfo, pathOrFn?: FnString | string | false | null, deps?: PackageInfo[]): void;
export {};