From 344c6767d2419cb8fa2609741c577958b849fe38 Mon Sep 17 00:00:00 2001 From: Ken Erwin Date: Tue, 10 Jan 2023 20:53:00 -0500 Subject: [PATCH] fix: typing, but in a very ugly way --- src/index.ts | 7 ++++--- src/yarn-bound.ts | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/index.ts b/src/index.ts index 59c8cfe7..2371c15a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,8 +1,9 @@ import bondage from './bondage'; +import * as results from './results'; import YarnBound from './yarn-bound'; const { OptionsResult, TextResult, CommandResult } = bondage; -YarnBound.OptionsResult = OptionsResult; -YarnBound.TextResult = TextResult; -YarnBound.CommandResult = CommandResult; +YarnBound.OptionsResult = OptionsResult as unknown as results.OptionsResult; +YarnBound.TextResult = TextResult as unknown as results.TextResult; +YarnBound.CommandResult = CommandResult as unknown as results.CommandResult; export default YarnBound; diff --git a/src/yarn-bound.ts b/src/yarn-bound.ts index 7562134c..1ab3572d 100755 --- a/src/yarn-bound.ts +++ b/src/yarn-bound.ts @@ -1,6 +1,6 @@ import bondage from './bondage'; import parseLine from './line-parser'; - +import { CommandResult, OptionsResult, TextResult } from './results'; interface props { dialogue: string; @@ -13,9 +13,9 @@ interface props { } export default class YarnBound { - static OptionsResult: typeof bondage.OptionsResult; - static TextResult: typeof bondage.TextResult; - static CommandResult: typeof bondage.CommandResult; + static OptionsResult: OptionsResult; + static TextResult: TextResult; + static CommandResult: CommandResult; public handleCommand: any; public combineTextAndOptionsResults: any; public bondage: any;