0👍
After many failed attempts, I went around the problem in the following way: I imported the Story
object directly from the library:
import { Story } from '../../node_modules/inkjs/engine/Story';
// ...
let story = new Story(storyText);
I know it’s not what the documentation recommends, but it works. And it seems everything else that needs to be imported is, because when I try to read story.currentChoices
I get an array of Choice
objects that are in turn perfectly readable.
So this works for me. If anyone else runs into this problem, I’m not saying it’s the right solution, I’m just saying that’s what I finally ended up doing.
Source:stackexchange.com