Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

story: ts-check #56

Draft
wants to merge 4 commits into
base: tsc_path
Choose a base branch
from
Draft

story: ts-check #56

wants to merge 4 commits into from

Conversation

jcorbin
Copy link
Collaborator

@jcorbin jcorbin commented Mar 4, 2021

Provisional first run at type checking the story module

  • TODO get much more firm about the node shape, probably leveling up to a structural enum
  • maybe breakout the refactor from "Node Constructors" to "anonymous node object makers" separate from this PR
  • confirm all of my semantic hunches about what Arg, Expr, and Atom are, since currently the only spec seems to be "whatever Engine does"

In fact, all of the changes in this PR were done without looking at engine code at all, merely inferring from usage here in the story builder.

@jcorbin jcorbin mentioned this pull request Mar 4, 2021
32 tasks
Copy link
Member

@kriskowal kriskowal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With TypeScript involved, I think it would be sensible for story.js to evaporate into a puff of TypeScript definitions of each instruction type and use literals throughout the grammar and engine.

* @prop {string} type
* @prop {Arg} [next] -- NOTE only $goto isn't able to satisfy tighter string type
* - is that valid?
* - why can $ask lack a next?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ask is the prompt >, in which case the “next” is the chosen option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants