This is my rollup config:
import ts from "rollup-plugin-ts";
const plugins = () => [
ts({
transpiler: "typescript"
})
];
export default [
{
input: 'src/index.ts',
output: {
format: 'iife',
file: 'dist/dialog-element-macro.js',
name: 'DialogElementMacro',
sourcemap: true,
},
plugins: plugins(),
},
];
This is the output it generates:
var DialogElementMacro = (function (exports) {
// ...
exports.closeDialogElement = closeDialogElement;
exports.openDialogElement = openDialogElement;
return exports;
})({});
And this is the declaration file it generates:
declare function closeDialogElement(): void;
type TwineScript = string;
declare function openDialogElement(title: TwineScript, classes: string[], content: TwineScript, onOpen?: TwineScript, onClose?: TwineScript): void;
export { closeDialogElement, openDialogElement };
Shouldn't this declaration file define these functions within a DialogElementMacro "namespace?" Pretty much all I want to know so I can troubleshoot from there.