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

Update README.md with imports #1071

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ var result = EvaluateFunction('my_ink_function', ['arg1', 'arg2'], true);
As this library is a port from C#, it requires a less standard way to assign the `Story` class, including all other classes, to a variable:

```ts
import { Story, Compiler } from 'inkjs';
import { Story } from 'inkjs';
import { Compiler } from 'inkjs/full'; // Compiler is not provided in the default inkjs package

let story: InstanceType<typeof Story>;
let compiler: InstanceType<typeof Compiler>;
Expand All @@ -149,7 +150,7 @@ let compiler: InstanceType<typeof Compiler>;
Further, to minimize the verbose assignment, you can also create aliases in your project:

```ts
import { Story, Compiler } from 'inkjs';
import { Story, Compiler } from 'inkjs/full'; // Story is also provided in the "full" subpackage.

export type InkStory = InstanceType<typeof Story>;
export type InkCompiler= InstanceType<typeof Compiler>;
Expand Down
Loading