Skip to content

Commit

Permalink
Merge pull request #33 from jy95/betterWebpackSupport
Browse files Browse the repository at this point in the history
style: improve typings
  • Loading branch information
jy95 authored Apr 11, 2024
2 parents b1cf659 + 9d0cca6 commit f2a20f6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ import type {
I18N,
} from "./types";

// backends i18next
const localeImport = async (lng: Language, ns: NamespacesLocale) =>
import(`./locales/${lng}/${ns}.json`);

export class FhirDosageUtils {
// Configuration (Immutability has its advantages ...)
config: Config;
Expand Down Expand Up @@ -90,7 +86,8 @@ export class FhirDosageUtils {
backends: [
resourcesToBackend(
// have to cast the function to be webpack / builder friendly
localeImport as any,
async (lng: Language, ns: NamespacesLocale) =>
import(`./locales/${lng}/${ns}.json`),
),
],
},
Expand Down

0 comments on commit f2a20f6

Please sign in to comment.