/**
 * Module representation types for Tsonic compiler
 */
export const createModuleInfo = (filePath, sourceText, imports = [], exports = [], hasTopLevelCode = false, namespace, className) => ({
    filePath,
    sourceText,
    imports,
    exports,
    hasTopLevelCode,
    namespace,
    className,
});
export const createModuleGraph = (modules = new Map(), dependencies = new Map(), dependents = new Map(), entryPoints = []) => ({
    modules,
    dependencies,
    dependents,
    entryPoints,
});
export const addModule = (graph, module) => {
    const newModules = new Map(graph.modules);
    newModules.set(module.filePath, module);
    return {
        ...graph,
        modules: newModules,
    };
};
export const isLocalImport = (importSpec) => importSpec.startsWith(".") || importSpec.startsWith("/");
//# sourceMappingURL=module.js.map