简体   繁体   中英

Typescript error in ngrx/effects: computed property name must refer to a built in symbol

I am working with ngrx to implement an app state in my ionic 3.9.2 app (using this tutorial for guidance: https://gonehybrid.com/a-beginners-guide-to-using-ngrx-in-an-ionic-2-app-part-1/ )

I am currently receiving this error when I try to run the app:

typescript: ...foo/bar/node_modules/@ngrx/effects/src/on_run_effects.d.ts, line: 9
A computed property name in a type literal must directly refer to a built-in symbol.

The error is in reference to the following code block:

export declare function isOnRunEffects(sourceInstance: {
    [onRunEffectsKey]?: onRunEffectsFn;
}): sourceInstance is OnRunEffects;

I am using ngrx effects version 6.1.0.

Any and all help is appreciated, as I am admittedly quite stumped by this. Thanks.

EDIT

I am using typescript version 3.0.1

Based on the error message, it looks like you're using a TypeScript version older than 2.7. Please upgrade to 2.7 or newer, which has new rules .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM