vanilla-native-federation
Version:
A lightweight **runtime micro frontend orchestrator** that loads micro frontends built with native federation into any web page. It can cache dependencies across page reloads, making it perfect for traditional server-rendered hosts (PHP, Java, Rails, etc.
19 lines (18 loc) • 697 B
TypeScript
type StorageEntry<TValue> = {
set: (value: TValue) => StorageEntry<TValue>;
get: () => TValue | undefined;
clear: () => StorageEntry<TValue>;
};
type StorageEntryKey = number | symbol | string;
type StorageEntryCreator = (namespace: string) => StorageEntryHandler;
type StorageEntryHandler = <TValue>(key: string, initialValue: TValue) => StorageEntry<TValue>;
type StorageConfig = {
storage: StorageEntryHandler;
clearStorage: boolean;
};
type StorageOptions = {
storage?: StorageEntryCreator;
clearStorage?: boolean;
storageNamespace?: string;
};
export { StorageEntry, StorageEntryKey, StorageEntryHandler, StorageConfig, StorageOptions, StorageEntryCreator, };