cristianbote/goober

Got "Module '"goober"' has no exported member 'setup'" by declaring goober.d.ts to extend theme

abdmmar opened this issue · 2 comments

Overview

Hi! Thank you for the goober.

I'm using goober with TypeSscript and trying to extend the theme and want to add types to it by declaring goober.d.ts at the root folder like in the documentation:

import 'goober';

declare module 'goober' {
    export interface DefaultTheme {
        colors: {
            primary: string;
        };
    }
}

then I got the following error on my VSCode:
Module '"goober"' has no exported member 'setup'.
Module '"goober"' has no exported member 'styled'.

Since I don't know a lot about TypeScript, I don't know how to solve it. Should I copy all the declarations? am I doing it wrong or I'm missing something? Thank you

Additional Info

  • goober: 2.1.10
  • react: 18.2.0
  • typescript: 4.5.5

Is there a way you could create a codesandbox and share it here? That would help with debugging this.

Resolved just by moving goober.d.ts file from root folder to src folder