From ffd90b383d20d5e4387d1ed05bfb6d8d2d73677d Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Tue, 18 Jun 2024 13:28:51 -0400 Subject: [PATCH 1/2] Fix router-types --- ui/src/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/router.ts b/ui/src/router.ts index 9ac7b69a..de988106 100644 --- a/ui/src/router.ts +++ b/ui/src/router.ts @@ -1,6 +1,6 @@ import type { RouterDSL } from '@ember/-internals/routing'; -export function addRoutes(context: RouterDSL): void { +export function addRoutes(context: Pick): void { /** * We need a level of nesting for every `/` in the URL so that we don't over-refresh / render the whole page */ From 4596844dcdc858b40a0c0eed89ac3a2261643edf Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Tue, 18 Jun 2024 13:31:51 -0400 Subject: [PATCH 2/2] Update types for the setup util --- src/browser/virtual/setup.d.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/browser/virtual/setup.d.ts b/src/browser/virtual/setup.d.ts index 775ce071..0393f75f 100644 --- a/src/browser/virtual/setup.d.ts +++ b/src/browser/virtual/setup.d.ts @@ -1,5 +1,13 @@ import type { Manifest } from '@universal-ember/kolay-ui'; +interface ResolveMap { + [moduleName: string]: ScopeMap; +} + +interface ScopeMap { + [identifier: string]: unknown; +} + export function setupKolay( context: object, options?: { @@ -14,7 +22,7 @@ export function setupKolay( * - * - */ - topLevelScope?: Record; + topLevelScope?: ScopeMap; /** * Additional modules you'd like to be able to import from. @@ -22,7 +30,7 @@ export function setupKolay( * and allows you to have access to private libraries without * needing to publish those libraries to NPM. */ - resolve?: Record>; + resolve?: { [moduleName: string]: Promise }; /** * Provide additional remark plugins to the default markdown compiler.