Skip to content

Commit

Permalink
Add proper TypeScript definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
BytewaveMLP committed Sep 27, 2019
1 parent 9b1222b commit c35bda1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
5 changes: 0 additions & 5 deletions assortment__darkmodejs.d.ts

This file was deleted.

18 changes: 18 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
declare enum Theme {
DARK = 'dark',
LIGHT = 'light',
NO_PREF = 'no-preference',
NO_SUPP = 'no-support'
}

interface Config {
onChange: (activeTheme: Theme, themes: typeof Theme) => void;
}

interface DarkModeJS {
removeListeners: () => void;
}

declare function darkmodejs(config: Config): DarkModeJS;

export = darkmodejs;

0 comments on commit c35bda1

Please sign in to comment.