You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm submitting a ...
[X] bug report
[ ] feature request
[ ] question about the decisions made in the repository
Do you want to request a feature or report a bug?
Report a problem
What is the current behavior?
I see error Uncaught reflect-metadata shim is required when using class decorators on the JavaScript console.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
One of my files is an AI player for a game and I want it to emit an event when it has decided its next move. So, I have this:
export class ConnectFourAiPlayerWebWorker {
public nextMove = new EventEmitter<number>();
constructor(public worker: Worker, public playerNumber: number) {
worker.onmessage = (event: MessageEvent) => this.turnTaken(event);
}
takeTurn() {
this.worker.postMessage('TAKE_TURN');
}
turnTaken(event: MessageEvent) {
this.nextMove.emit(event.data);
}
}
It was working until I added public nextMove = new EventEmitter<number>();. It then started giving this error in the browser's console: connect-four-ai-player-worker-wrapper.ts?21e7:3 Uncaught reflect-metadata shim is required when using class decorators
Please tell us about your environment:
Angular version: 2.0.0-rc.4
Browser: Chrome 52.0.2743.116
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
I checked #353 but couldn't relate to the exact same problem. Plus, I don't think I would have to change the Webpack configuration or import new packages just to use EventEmitter. So my guess is that something else is wrong and chances are it's user error :-) Thanks in advance for your help!
The text was updated successfully, but these errors were encountered:
[X] bug report
[ ] feature request
[ ] question about the decisions made in the repository
Report a problem
I see error Uncaught reflect-metadata shim is required when using class decorators on the JavaScript console.
One of my files is an AI player for a game and I want it to emit an event when it has decided its next move. So, I have this:
It was working until I added
public nextMove = new EventEmitter<number>();
. It then started giving this error in the browser's console: connect-four-ai-player-worker-wrapper.ts?21e7:3 Uncaught reflect-metadata shim is required when using class decoratorsI checked #353 but couldn't relate to the exact same problem. Plus, I don't think I would have to change the Webpack configuration or import new packages just to use EventEmitter. So my guess is that something else is wrong and chances are it's user error :-) Thanks in advance for your help!
The text was updated successfully, but these errors were encountered: