Skip to content

Commit

Permalink
Fix imports and add docblocks
Browse files Browse the repository at this point in the history
Fixes a problem introduced in #1049 where the relative imports changed
to suit standalone references to these files on disk—but overlooked that
the tsconfig had `src` already mapped.
  • Loading branch information
maetl committed Apr 6, 2024
1 parent c691374 commit bab3e79
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions ink.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,41 @@
import { Story, InkList } from './src/engine/Story'
import { Compiler } from './src/compiler/Compiler'
import { CompilerOptions } from './src/compiler/CompilerOptions'
import { PosixFileHandler } from './src/compiler/FileHandler/PosixFileHandler'
import { JsonFileHandler } from './src/compiler/FileHandler/JsonFileHandler'
import { Story, InkList } from './engine/Story'
import { Compiler } from './compiler/Compiler'
import { CompilerOptions } from './compiler/CompilerOptions'
import { PosixFileHandler } from './compiler/FileHandler/PosixFileHandler'
import { JsonFileHandler } from './compiler/FileHandler/JsonFileHandler'

declare interface Inkjs {
/**
* A Story is the core class that represents a complete Ink narrative, and
* manages runtime evaluation and state.
*/
Story: typeof Story

/**
* The underlying type for a list item in Ink.
*/
InkList: typeof InkList

/**
* Compiles Ink stories from source.
*/
Compiler: typeof Compiler

/**
* Metadata options for a compiler pass.
*/
CompilerOptions: typeof CompilerOptions

/**
* Resolves and loads Ink sources from a POSIX filesystem.
*/
PosixFileHandler: typeof PosixFileHandler

/**
* Resolves and loads Ink sources from a JSON hierarchy.
*/
JsonFileHandler: typeof JsonFileHandler
}

declare let inkjs: Inkjs
export default inkjs
export default inkjs

0 comments on commit bab3e79

Please sign in to comment.