Skip to content
Snippets Groups Projects
Forked from an inaccessible project.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
module-import-check.ts 286 B
// 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);
	}
	}