Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add TypeScript types #74

Open
milan-gm opened this issue May 30, 2023 · 3 comments
Open

add TypeScript types #74

milan-gm opened this issue May 30, 2023 · 3 comments

Comments

@milan-gm
Copy link

Screenshot_20230530_095917

@paulglx
Copy link

paulglx commented Jul 9, 2023

Hey, I got the same exact error after installing.

@bbonamin
Copy link

To get around this issue you can add custom types to your project, e.g. at nightwind-helper.d.ts:

declare module "nightwind/helper" {
  type NightwindHelperModule = {
    init: () => string;
    beforeTransition: () => void;
    toggle: () => void;
    enable: (dark: boolean) => void;
    checkNightMode: () => boolean;
    watchNightMode: () => void;
    addNightModeSelector: () => void;
    addNightTransitions: () => void;
    initNightwind: () => void;
    toggleNightMode: () => void;
  };

  const nightwindHelper: NightwindHelperModule;

  export default nightwindHelper;
}

AlexErrant added a commit to AlexErrant/Pentive that referenced this issue Aug 1, 2023
@CommanderStorm
Copy link

FYI: @types/nightwind is now avaliable.
You can install it via

npm install --save-dev @types/nightwind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants