polyipseity / obsidian-modules

Load JavaScript and related languages like TypeScript modules from the vault and the Internet.
GNU Affero General Public License v3.0
68 stars 4 forks source link

TypeScript imports don't work #9

Closed mnaoumov closed 9 months ago

mnaoumov commented 9 months ago

Considering issue #7 fixed with my PR #8

!Scripts/test.ts

export function sayHello(name: string) {
  console.log(`hello ${name}`);
}

!Scripts/test2.ts

import { sayHello } from "./test";

export function sayHello2(name: string) {
  sayHello(name + name);
}

and invoke from the Developer Tools console

const test2 = await self.require.import("!Scripts/test2.ts");

getting error

mnaoumov commented 9 months ago

Accidental clone of #10

mnaoumov commented 9 months ago

Accidental clone of #10