Skip to content

Conversation

billdami
Copy link

  • Add game_changer Card field
  • Add Spree FrameEffect
  • Add note to readme about possible usage gotcha due to the library not being pre-transpiled

* switch module to esnext

* add game_changer card field

* revert module config change

* add spree frame effect

* add note to readme about transpilation for use of enums at runtime

* reword
@@ -88,6 +88,8 @@ All primary types and values are prefixed with `Scryfall` to avoid conflict with

Enum fields are described both in terms of an enum and a set of strings in order to give you the option of interacting with that field with either one.

In order to use the provided enum values in runtime code (i.e. outside of just compile-time type checking), you may need to configure your project's build pipeline/module bundler to ensure it is transpiling the Typescript source code in the `@scryfall/api-types` package. Many module bundlers exclude `node_modules` from Typescript transpilation for performance reasons, but provide methods to force inclusion of specific paths (e.g. Webpack's `module.rules`, or Next.js's `transpilePackages` configurations).
Copy link
Author

Choose a reason for hiding this comment

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

I don't know how commonly people run into this issue, but it happened to me, so it felt worth pointing out. The better option might be to transpile src/ on publish, so it just works out-of-the-box in all envs, but a quick note seemed sufficient in lieu of that.

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.

1 participant