UNPKG

hot-hook

Version:

Easy hot module reloading (HMR) for Node.js and ESM

15 lines (14 loc) 600 B
/** * This class is responsible for checking if a given specifier * is imported dynamically from a given parent file. * Otherwise we will throw an error since we cannot make the file reloadable * * We are caching the results to avoid reading the same file multiple times * * When no import is found for the given specifier we assume that it is imported using a dynamic specifier. */ export declare class DynamicImportChecker { private cache; ensureFileIsImportedDynamicallyFromParent(parentPath: string, specifier: string): Promise<boolean>; invalidateCache(key: string): void; }