Skip to content
Snippets Groups Projects
module-import-check.ts 286 B
Newer Older
jvanboxtel@wisc.edu's avatar
jvanboxtel@wisc.edu committed
// Prevents core module from being loaded twice by mistak
export function throwIfAlreadyLoaded(parentModule: any, moduleName: string) {
	if (parentModule) {
		const msg = `${moduleName} has already been loaded. Import Core modules in the AppModule only.`;
		throw new Error(msg);
	}
	}