UNPKG

@botonic/plugin-contentful

Version:

Botonic Plugin Contentful is one of the **[available](https://github.com/hubtype/botonic/tree/master/packages)** plugins for Botonic. **[Contentful](http://www.contentful.com)** is a CMS (Content Management System) which manages contents of a great variet

28 lines (27 loc) 701 B
export declare class Singleton<T> { private readonly factory; private factoryOutput; private isValueSet; constructor(factory: () => T); get value(): T; } /** * Singletons dictionary accessible through a string */ export declare class SingletonMap<T> { private readonly map; constructor(map: { [key: string]: () => T; }); value(key: string): T; } /** * Given a factory function (string) => T, * it ensures that we don't invoke it more than once per each input value */ export declare class DynamicSingletonMap<T> { private readonly factories; private readonly values; constructor(factories: (key: string) => T); value(key: string): T; }