From 08ef80522f3b3088f1232bb10743ca049c55fc4f Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 4 May 2024 12:24:22 -0500 Subject: [PATCH] fdsfD --- src/core/module-loading.ts | 1 - src/core/operators.ts | 19 +++++++++---------- src/handlers/presence.ts | 8 ++------ src/sern.ts | 1 - 4 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/core/module-loading.ts b/src/core/module-loading.ts index 6f7b0aa..ccac73d 100644 --- a/src/core/module-loading.ts +++ b/src/core/module-loading.ts @@ -1,5 +1,4 @@ import path from 'node:path'; -import assert from 'assert'; import { existsSync } from 'fs'; diff --git a/src/core/operators.ts b/src/core/operators.ts index ec4b1a8..e2d0113 100644 --- a/src/core/operators.ts +++ b/src/core/operators.ts @@ -18,7 +18,6 @@ import { import type { Emitter, ErrorHandling, Logging } from './interfaces'; import util from 'node:util'; import type { PluginResult } from '../types/core-plugin'; -import type { Result } from 'ts-results-es' import type { VoidResult } from './_internal'; /** * if {src} is true, mapTo V, else ignore @@ -70,12 +69,12 @@ export function handleError(crashHandler: ErrorHandling, emitter: Emitter, lo return caught; }; } -// Temporary until i get rxjs operators working on ts-results-es -export const filterTap = (onErr: (e: R) => void): OperatorFunction, K> => - pipe(concatMap(result => { - if(result.isOk()) { - return of(result.value) - } - onErr(result.error); - return EMPTY - })) +//// Temporary until i get rxjs operators working on ts-results-es +//const filterTap = (onErr: (e: R) => void): OperatorFunction, K> => +// pipe(concatMap(result => { +// if(result.isOk()) { +// return of(result.value) +// } +// onErr(result.error); +// return EMPTY +// })) diff --git a/src/handlers/presence.ts b/src/handlers/presence.ts index 331f545..821858e 100644 --- a/src/handlers/presence.ts +++ b/src/handlers/presence.ts @@ -20,11 +20,7 @@ const parseConfig = async (conf: Promise) => { return of(s).pipe(take(1)); }) }; -interface PresenceModule { - module: PresenceConfig<(keyof Dependencies)[]> -} -export const presenceHandler = (path: string, setPresence: SetPresence) => { - + // const presence = Files // .importModule(path) // .then(({ module }) => { @@ -40,4 +36,4 @@ export const presenceHandler = (path: string, setPresence: SetPresence) => { // concatMap(fn => parseConfig(fn())), // // subscribe to the observable parseConfig yields, and set the presence. // concatMap(conf => conf.pipe(map(setPresence)))); -} + diff --git a/src/sern.ts b/src/sern.ts index 9ff09bb..3719479 100644 --- a/src/sern.ts +++ b/src/sern.ts @@ -2,7 +2,6 @@ import callsites from 'callsites'; import * as Files from './core/module-loading'; import { Services } from './core/ioc'; import type { DependencyList } from './types/ioc'; - interface Wrapper { commands?: string; defaultPrefix?: string;