Skip to content

Commit

Permalink
Merge pull request #1071 from y-lohse/smwhr-patch-2
Browse files Browse the repository at this point in the history
Update README.md with imports
  • Loading branch information
smwhr authored Jul 29, 2024
2 parents a50a7c0 + e065c48 commit 7127ddd
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit 7127ddd

Please sign in to comment.