“Type ‘EventEmitter’ is not generic” ERROR in angular


产生原因:
在使用VSCode添加EventEmitter时,IDE会自动导入imports EventEmitter from Node.js

import { EventEmitter } from "events";

修改成Angular中的EventEmitter即可:

import { EventEmitter } from "@angular/core";