custom-electron-titlebar
custom-electron-titlebar copied to clipboard
Cannot import `custom-electron-titlebar/main` using TypeScript's `import`
I can't import something from custom-electron-titlebar/main using TypeScript's import
import { setupTitlebar, attachTitlebarToWindow } from "custom-electron-titlebar/main";
Cannot find module 'custom-electron-titlebar/main' or its corresponding type declarations.
import it's not from TypeScript. It's from ES6-Syntax.
Same problem here. Using electron-forge project, but I upgraded to latest typescript compiler as older version didn't support the export field in the package.json. This fixed my import in of custom-electron-titlebar in preload but seeing the same error reported here with the main import.
The package is missing dist/main.d.ts. Temporary fix is to put this in a .d.ts:
import type cetMain from "custom-electron-titlebar/dist/main/main";
declare module "custom-electron-titlebar/main" {
const exports: cetMain;
export default exports;
}
I've just installed 4.1.2 and the issue still exists.
I've just installed 4.1.2 and the issue still exists.
Yes, checking is an error by file name Fixed on 4.1.3