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

fix: typescript definitions broken #1019

Conversation

bemisguided
Copy link
Contributor

Checklist

  • The new code additions passed the tests (npm test).
  • The linter ran and found no issues (npm run-script lint).

Description

The TypeScript definitions were not working for me. I tried the following variations:

import * as inkjs from 'inkjs'

let story: inkjs.Story;
import { Story } from 'inkjs'

let story: Story;

In both cases I received the error: 'Story' refers to a value, but is being used as a type here. Did you mean 'typeof Story'?

I attempted typeof inkjs.Story and typeof Story but in both cases this caused TypeScript to not recognized any of the properties and methods of the Story class.

With the changes in this PR, both the above methods of importing work.

@bemisguided bemisguided deleted the fix/typescript-definitions-broken branch July 25, 2023 16:39
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.

None yet

1 participant